diff options
author | Stuart Monteith <stuart.monteith@linaro.org> | 2020-01-13 14:39:09 +0000 |
---|---|---|
committer | Stuart Monteith <stuart.monteith@linaro.org> | 2020-01-13 14:40:17 +0000 |
commit | 53ae798a662dece9022fe74d1fa300df0951ff9e (patch) | |
tree | 6cfb2bc56dbea62340a9466ae6e3bc79c07577be /jdk14-jtreg-test.yaml | |
parent | 53fc061fe066fcd3d022f49d7947164d3d034033 (diff) |
jdk: Add jdk14 jobs
Creates all the new jobs required for jdk14. Disables jdk12, which was
obsoleted by jdk13.
Change-Id: Idd622d78764932837a493f7e65f93e0969866a5b
Diffstat (limited to 'jdk14-jtreg-test.yaml')
-rw-r--r-- | jdk14-jtreg-test.yaml | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/jdk14-jtreg-test.yaml b/jdk14-jtreg-test.yaml new file mode 100644 index 0000000000..254f481ab5 --- /dev/null +++ b/jdk14-jtreg-test.yaml @@ -0,0 +1,191 @@ +- job: + name: jdk14-jtreg-test + project-type: matrix + defaults: global + description: | + * Runs the jtreg tests. + properties: + - authorization: + linaro: + - job-read + openjdk-members: + - job-read + - job-extended-read + - job-build + - job-cancel + - job-workspace + - build-discarder: + days-to-keep: 30 + num-to-keep: 10 + artifact-num-to-keep: 5 + parameters: + - string: + name: YEAR + default: 'default' + - string: + name: DAY_OF_YEAR + default: 'default' + disabled: false + node: j12-qrep-01 + display-name: 'OpenJDK 14 - Run jtreg tests' + axes: + - axis: + type: user-defined + name: BUILD_TYPE + values: + - release + - axis: + type: user-defined + name: JTREG_CATEGORY + values: + - hotspot + - langtools + - jdk + - axis: + type: slave + name: label + values: + - j12-qrep-01 + execution-strategy: + sequential: true + wrappers: + - xvfb: + auto-display-name: true + additional-options: '-p unix' + debug: true + - workspace-cleanup: + dirmatch: false + - timestamps + - matrix-tie-parent: + node: j12-qrep-01 + builders: + - shell: | + #!/bin/bash + + echo "DISPLAY=${DISPLAY}" + + set -exu + + DEPS=$HOME/workspace/jdk14-get-deps + + source $DEPS/build-date.sh + + export JDK_VERSION=14 + IMAGE_DIR=${WORKSPACE}/jdk14-${BUILD_TYPE} + PERSIST=$HOME/srv/openjdk14 + + JCSTRESS=$DEPS/jcstress.jar + + tar xf $DEPS/jdk14.tar.gz + tar xf ~/workspace/jdk14-build-image/BUILD_TYPE/${BUILD_TYPE}/label/${NODE_NAME}/out/jdk14-${BUILD_TYPE}.tar.gz + tar xf $DEPS/jtreg-build-4.2.0-SNAPSHOT.tar.xz + tar xf ~/workspace/jdk14-build-image/BUILD_TYPE/${BUILD_TYPE}/label/${NODE_NAME}/out/jdk14-${BUILD_TYPE}-support.tar.gz + + # All the output directories and general frobbing + # output is to match the existing layout as expected + # by the cron-based publish and reporting scripts. + # XXX There's probably a better way. + + YEAR=XXX__YEAR__XXX + DAY_OF_YEAR=YYY__DAY_OF_YEAR__YYY + + basedir=cron_output + mkdir -p ${basedir}/{src,builds,reports} + + src_dir=${basedir}/src/${YEAR}/${DAY_OF_YEAR} + work_dir=${basedir}/builds/${BUILD_TYPE}/${YEAR}/${DAY_OF_YEAR}/JTwork-${JTREG_CATEGORY} + report_dir=${basedir}/reports/${BUILD_TYPE}/${JTREG_CATEGORY}/$(uname -m)/${YEAR}/${DAY_OF_YEAR}/JTreport + + mkdir -p out ${src_dir} ${work_dir} ${report_dir} + + mv jdk14/* ${src_dir} + + blacklist=${WORKSPACE}/excludes.txt + # Add jtreg directory level for hotspot only. + jdk_problem_list=${src_dir}/test/${JTREG_CATEGORY} + if [ $JTREG_CATEGORY = "hotspot" ]; then + jdk_problem_list=${jdk_problem_list}/jtreg/ProblemList.txt + else + jdk_problem_list=${jdk_problem_list}/ProblemList.txt + fi + + if [ -e $jdk_problem_list ]; then + cat $jdk_problem_list > ${blacklist} + fi + + aarch64_exclude_file=${src_dir}/test/exclude_aarch64.txt + + if [ -e ${aarch64_exclude_file} ]; then + cat ${aarch64_exclude_file} >> ${blacklist} + fi + + touch ${blacklist} + + echo "Blacklist" + echo "=========" + cat ${blacklist} + echo "---------" + + export JAVA_HOME=${WORKSPACE}/jdk14-${BUILD_TYPE} + export PATH=$JAVA_HOME/bin:${PATH} + + # For hotspot and jdk we pass a -nativepath: option to jtreg. + # This enables the tests needing native libraries to run. + NATIVEPATH=${WORKSPACE}/jdk14-${BUILD_TYPE}-support/support/test/${JTREG_CATEGORY}/jtreg/native/lib + + if [ $JTREG_CATEGORY = "langtools" ]; then + # The nativepath option we pass must be a valid directory, or + # not at all.` + NATIVE_OPT= + else + # Test executables are expected to be in same directory as libraries + mv $NATIVEPATH/../bin/* $NATIVEPATH + NATIVE_OPT=-nativepath:$NATIVEPATH + fi + + PATH=${WORKSPACE}/jtreg/bin:${PATH} + which java + java -version + + # Ignore error in jtreg final result. + set +e + + # hotspot splits its tests into gtest jtreg tests. We just do jtreg. + if [ $JTREG_CATEGORY == "hotspot" ]; then + TEST_SUBDIR=test/${JTREG_CATEGORY}/jtreg:hotspot_all_no_apps + else + TEST_SUBDIR=test/${JTREG_CATEGORY} + fi + + java -jar jtreg/lib/jtreg.jar \ + -dir:${src_dir} \ + -vmoption:-Djdk.test.lib.artifacts.jcstress-tests-all=$JCSTRESS \ + -vmoption:-Xmx2G \ + -testjdk:${IMAGE_DIR} \ + -exclude:${blacklist} \ + -conc:20 \ + -r:${report_dir} \ + -w:${work_dir} \ + $NATIVE_OPT \ + -timeout:8 \ + -a -agentvm -ignore:quiet -v1 ${TEST_SUBDIR}| cat -n + + + # Kill leftover jstatd processes. + killall -9 jstatd + set -e + + # We don't care for the .class files. + find ${work_dir} -name \*.class -exec rm {} \; + + # Match the exact output of the cron-based scripts. + dest=$PERSIST/openjdk-jtreg-nightly-tests + sed_expr=$(echo s!${WORKSPACE}/${basedir}!$dest!g) + find ${work_dir} -type f -exec perl -p -i -e "$sed_expr" {} \; + find ${report_dir} -type f -exec perl -p -i -e "$sed_expr" {} \; + + mkdir -p out + tar -C ${basedir} --show-transformed-names -acvf out/jtreg-results-${JTREG_CATEGORY}-${BUILD_TYPE}.tar.gz builds reports + publishers: + - archive: + artifacts: 'out/jtreg-results-${JTREG_CATEGORY}-${BUILD_TYPE}.tar.gz' |