< prev index next >

test/jdk/tools/jpackage/run_tests.sh

Print this page

        

*** 6,16 **** # Fail fast set -e; set -o pipefail; ! workdir=/tmp/jpackage_jtreg_testing jtreg_jar=$workdir/jtreg/lib/jtreg.jar jpackage_test_selector=test/jdk/tools/jpackage --- 6,17 ---- # Fail fast set -e; set -o pipefail; ! # $JTREG_BUNDLE_URL (Link can be obtained from https://openjdk.java.net/jtreg/ page) ! jtreg_bundle=$JTREG_BUNDLE_URL workdir=/tmp/jpackage_jtreg_testing jtreg_jar=$workdir/jtreg/lib/jtreg.jar jpackage_test_selector=test/jdk/tools/jpackage
*** 178,187 **** --- 179,194 ---- fi if [ ! -e "$JAVA_HOME/bin/java" ]; then fatal JAVA_HOME variable is set to [$JAVA_HOME] value, but $JAVA_HOME/bin/java not found. fi + if [ -z "$JTREG_HOME" ]; then + if [ -z "$JTREG_BUNDLE_URL" ]; then + fatal 'JTREG_HOME or JTREG_BUNDLE_URL environment variable is not set. Link to JTREG bundle can be found at https://openjdk.java.net/jtreg/'. + fi + fi + if [ -n "$runtime_dir" ]; then if [ ! -d "$runtime_dir" ]; then fatal 'Value of `-r` option is set to non-existing directory'. fi jtreg_args+=("-Djpackage.test.runtime-image=$(to_native_path "$(cd "$runtime_dir" && pwd)")")
*** 216,231 **** installJtreg () { # Install jtreg if missing if [ ! -f "$jtreg_jar" ]; then exec_command mkdir -p "$workdir" ! # TODO - restore code to download or copy jtreg.jar ! # to $workdir/jtreg/lib/jtreg.jar ! fatal "ERROR: All Tests Disabled until locating jtreg.jar implemented." fi } preRun () { --- 223,251 ---- installJtreg () { # Install jtreg if missing + if [ -z "$JTREG_HOME" ]; then if [ ! -f "$jtreg_jar" ]; then exec_command mkdir -p "$workdir" ! if [[ ${jtreg_bundle: -7} == ".tar.gz" ]]; then ! exec_command "(" cd "$workdir" "&&" wget "$jtreg_bundle" "&&" tar -xzf "$(basename $jtreg_bundle)" ";" rm -f "$(basename $jtreg_bundle)" ")" ! else ! if [[ ${jtreg_bundle: -4} == ".zip" ]]; then ! exec_command "(" cd "$workdir" "&&" wget "$jtreg_bundle" "&&" unzip "$(basename $jtreg_bundle)" ";" rm -f "$(basename $jtreg_bundle)" ")" ! else ! fatal 'Unsupported extension of JREG bundle ['$JTREG_BUNDLE_URL']. Only *.zip or *.tar.gz is supported.' fi + fi + fi + else + # use jtreg provided via JTREG_HOME + jtreg_jar=$JTREG_HOME/lib/jtreg.jar + fi + + echo 'jtreg jar file: '$jtreg_jar } preRun () {
< prev index next >