summaryrefslogtreecommitdiff
path: root/openembedded
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2013-08-30 15:17:38 +0100
committerAndrew McDermott <andrew.mcdermott@linaro.org>2013-08-30 15:17:38 +0100
commit4dcc1956e14805dd9ef8706469595bffd98d4c9f (patch)
treee0c357941569401294a3cacc49672f7a1b24fc81 /openembedded
parent5914cafadea4f12994e67db1af93d480019f1ffc (diff)
jtreg: use external script for running tests
Also enabled more jdk tests. Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'openembedded')
-rw-r--r--openembedded/jtreg.yaml31
-rwxr-xr-xopenembedded/scripts/jtreg-jdk-test68
2 files changed, 87 insertions, 12 deletions
diff --git a/openembedded/jtreg.yaml b/openembedded/jtreg.yaml
index fe81174..190464e 100644
--- a/openembedded/jtreg.yaml
+++ b/openembedded/jtreg.yaml
@@ -6,12 +6,9 @@ metadata:
install:
git-repos:
- - git://git.linaro.org/leg/openjdk/jtreg-bin.git
- - git://git.linaro.org/leg/openjdk/openjdk8-aarch64-prebuilt-tests.git
-
-# This is the full set but right now we're only testing with jdk_math.
-#
-# - 'MAKE_TESTS="jdk_awt jdk_beans1 jdk_beans2 jdk_beans3 jdk_beans jdk_io jdk_lang jdk_jmx jdk_management jdk_math jdk_time jdk_other jdk_net jdk_nio jdk_sctp jdk_rmi jdk_security1 jdk_security2 jdk_security3 jdk_security jdk_sound jdk_swing jdk_text jdk_jdi jdk_tools jdk_jfr jdk_jfr jdk_util"'
+ - git://git.linaro.org/leg/openjdk/jtreg-bin.git
+ - git://git.linaro.org/leg/openjdk/openjdk8-aarch64-prebuilt-tests.git
+ - git://git.linaro.org/qa/test-definitions.git
run:
steps:
@@ -21,16 +18,26 @@ run:
- 'TEST_DIR=/lava/tests/$TESTRUN_ID/openjdk8-aarch64-prebuilt-tests'
- 'CLASSES_DIR=$TEST_DIR/JTwork/classes'
- 'for i in $CLASSES_DIR/*; do find $i -print | xargs touch -d tomorrow; done'
- - 'pushd $PWD'
- 'df -h'
+ - 'pushd $PWD'
- 'cd $TEST_DIR; tar xf openjdk8-aarch64-snapshot.tar'
- 'popd'
- - 'which jtreg-lava'
+ - 'df -h'
- 'export JT_HOME=/lava/tests/$TESTRUN_ID/jtreg-bin/jtreg'
- 'export JT_JAVA=/usr/lib/jvm/java-8-openjdk/bin/java'
- - 'JDK_HOME=/usr/lib/jvm/java-8-openjdk'
- - 'JDK_TEST_DIR=$TEST_DIR/openjdk8-aarch64-snapshot/jdk/test'
+ - 'export PRODUCT_HOME=/usr/lib/jvm/java-8-openjdk'
+ - 'export JDK_TEST_DIR=$TEST_DIR/openjdk8-aarch64-snapshot/jdk/test'
- 'export JDK_TEST_VMOPTS=-vmoption:-Xint'
- - 'MAKE_TESTS="jdk_math"'
+ - 'export JTREG=$JT_HOME/linux/bin/jtreg-lava'
- 'export JTREG_LAVA_PREBUILT_CLASSES_DIR=$CLASSES_DIR'
- - 'for i in $MAKE_TESTS; do rm -rf /tmp/jtreg; mkdir -p /tmp/jtreg; d=/tmp/jtreg/testoutput/$i; pl=$d/passlist.txt; fl=$d/faillist.txt; lava-test-case $i --shell make -C $JDK_TEST_DIR PRODUCT_HOME=$JDK_HOME JTREG=$JT_HOME/linux/bin/jtreg-lava ALT_OUTPUTDIR=/tmp/jtreg $i; [ -e $pl ] && lava-test-case-attach $i $pl; [ -e $fl ] && lava-test-case-attach $i $fl; for j in $d/JTwork/scratch/hs*.log; do lava-test-case-attach $i $j; done; done'
+ - 'cd test-definitions/openembedded/scripts'
+ - './jtreg-jdk-test jdk_beans1'
+ - './jtreg-jdk-test jdk_io'
+ - './jtreg-jdk-test jdk_lang'
+ - './jtreg-jdk-test jdk_math'
+ - './jtreg-jdk-test jdk_net'
+ - './jtreg-jdk-test jdk_other'
+ - './jtreg-jdk-test jdk_security1'
+ - './jtreg-jdk-test jdk_text'
+ - './jtreg-jdk-test jdk_time'
+ - './jtreg-jdk-test jdk_util'
diff --git a/openembedded/scripts/jtreg-jdk-test b/openembedded/scripts/jtreg-jdk-test
new file mode 100755
index 0000000..84050be
--- /dev/null
+++ b/openembedded/scripts/jtreg-jdk-test
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+# JTREG jdk test harness.
+#
+# 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>
+#
+
+if [ $# -lt 1 ]; then
+ echo "usage: $0: <jdk-test>" >&2
+ exit 1
+fi
+
+if [ -z "$PRODUCT_HOME" ]; then
+ echo "error: PRODUCT_HOME not set!" >&2
+ exit 1
+fi
+
+if [ -z "$JT_HOME" ]; then
+ echo "error: JT_HOME not set!" >&2
+ exit 1
+fi
+
+if [ -z "$JDK_TEST_DIR" ]; then
+ echo "error: JDK_TEST_DIR not set!" >&2
+ exit 1
+fi
+
+if [ -z "$JTREG" ]; then
+ JTREG=$JT_HOME/linux/bin/jtreg-lava
+fi
+
+jdk_test=$1; shift
+
+t=/tmp/jtreg/$jdk_test.$$
+rm -rf $t
+mkdir -p $t
+d=$t/testoutput/$jdk_test
+pl=$d/passlist.txt
+fl=$d/faillist.txt
+
+lava-test-case $jdk_test \
+ --shell \
+ make -C $JDK_TEST_DIR PRODUCT_HOME=$PRODUCT_HOME JTREG=$JTREG ALT_OUTPUTDIR=$t $jdk_test
+
+exit_code=$?
+
+[ -e $pl ] && lava-test-case-attach $jdk_test $pl
+[ -e $fl ] && lava-test-case-attach $jdk_test $fl
+
+rm -rf $t
+
+exit $exit_code