summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2015-01-22 09:56:00 +0000
committerAndrew McDermott <andrew.mcdermott@linaro.org>2015-01-22 09:56:00 +0000
commit5c4f4401063f583ae24ebcf10dfc79f65fc081d0 (patch)
tree0fb8555e10416f0d38ef8b81ea01fbe0b70cf7f2
parentecf1744bd2552e0cee8050e4b765ee048144e045 (diff)
Add make-mauve-yaml-filesHEADmaster
-rwxr-xr-xmake-mauve-yaml-files.sh120
1 files changed, 120 insertions, 0 deletions
diff --git a/make-mauve-yaml-files.sh b/make-mauve-yaml-files.sh
new file mode 100755
index 0000000..c2ece67
--- /dev/null
+++ b/make-mauve-yaml-files.sh
@@ -0,0 +1,120 @@
+#!/bin/bash
+
+# Copyright (C) 2013, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
+#
+
+progname=$(basename $0)
+
+function yaml_test_case_content() {
+ local testname=${1//\//-}
+
+ oldifs=$IFS
+
+ IFS='' read -r -d '' t1 <<EOF
+# Copyright (C) 2013, Linaro Limited.
+#
+# PLEASE DO NOT HAND EDIT THIS FILE.
+#
+# This file has been auto-generated from:
+#
+# $progname
+#
+# which can be found in the following repo:
+#
+# git://git.linaro.org/leg/openjdk/jtreg-lava-scripts
+#
+# PLEASE DO NOT HAND EDIT THIS FILE.
+#
+metadata:
+ name: ${testname}
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Regression tests for the OpenJDK platform"
+ version: 1.0
+ maintainer:
+ - andrew.mcdermott@linaro.org
+ os:
+ - openembedded
+ scope:
+ - test
+ devices:
+ - rtsm_ve-armv8
+params:
+ JAVA_VM: -client
+ JAVA_PRODUCT_BINARY: /usr/lib/jvm/java-8-openjdk/bin/java
+# timeout is in milliseconds
+ TIMEOUT: 60000
+EOF
+
+IFS='' read -r -d '' t2 <<-'EOF'
+run:
+ steps:
+ - 'echo -n "Harness VM version: "'
+ - 'java -version'
+ - 'echo -n "Product VM version: "'
+ - '$JAVA_PRODUCT_BINARY -version'
+ - 'rm -rf /tmp/mauve'
+ - 'ln -s $HOME/mauve /tmp/mauve'
+ - 'cd openembedded/scripts'
+EOF
+
+if [ $needx ]; then
+IFS='' read -r -d '' t2 <<-'EOF'
+EOF
+fi
+
+IFS=$oldifs
+echo "${t1}${t2}"
+}
+
+function yaml_postamble_content() {
+ oldifs=$IFS
+ IFS='' read -r -d '' postamble <<-'EOF'
+parse:
+ pattern: "(?P<result>(PASS|FAIL)):\\s+(?P<test_case_id>(.*))"
+ fixupdict:
+ PASS: pass
+ FAIL: fail
+EOF
+
+ IFS=$oldifs
+ echo "${postamble}"
+}
+
+core_tests="java/lang java/beans java/io java/math java/net java/nio java/rmi java/security java/sql java/text java/util BinaryCompatibility BinaryCompatibility/altered gnu/java gnu/javax javax/accessibility javax/crypto javax/imageio javax/management javax/naming javax/net javax/print javax/rmi javax/security javax/sound javax/xml locales org/omg org/w3c java/awt javax/swing"
+
+for i in $core_tests; do
+ fname=${i//\//-}
+ rm -f "mauve-${fname}.yaml"
+ echo "$i"
+ yaml_txt=$(yaml_test_case_content "mauve-${i}")
+ echo "$yaml_txt" >> "mauve-${fname}.yaml"
+ if [[ "$i" =~ "awt" || "$i" =~ "swing" ]]; then
+ echo " - 'DISPLAY=:10'" >> "mauve-${fname}.yaml"
+ echo " - 'export DISPLAY'" >> "mauve-${fname}.yaml"
+ echo " - 'Xvfb \$DISPLAY &'" >> "mauve-${fname}.yaml"
+ echo " - 'XVFBPID=\$!'" >> "mauve-${fname}.yaml"
+ echo " - 'sleep 30'" >> "mauve-${fname}.yaml"
+ fi
+ test_txt=" - './mauve-test-pkg gnu/testlet/$i /tmp/mauve -timeout \$TIMEOUT -vm \$JAVA_PRODUCT_BINARY -vmarg \$JAVA_VM -compile no -showpasses'"
+ echo "$test_txt" >> "mauve-${fname}.yaml"
+ if [[ "$i" =~ "awt" || "$i" =~ "swing" ]]; then
+ echo " - 'kill \$XVFBPID'" >> "mauve-${fname}.yaml"
+ fi
+ echo "$(yaml_postamble_content)" >> "mauve-${fname}.yaml"
+done