--- old/test/jdk/tools/jpackage/run_tests.sh 2019-12-13 13:37:03.212574700 -0500 +++ new/test/jdk/tools/jpackage/run_tests.sh 2019-12-13 13:37:02.181399500 -0500 @@ -41,7 +41,7 @@ help_usage () { - echo "Usage: `basename $0` [options] [test_names]" + echo "Usage: `basename $0` [options] [--] [jtreg_options|test_names]" echo "Options:" echo " -h - print this message" echo " -v - verbose output" @@ -58,16 +58,12 @@ echo ' -l - value for `jpackage.test.logfile` property.' echo " Optional, for jtreg tests debug purposes only." echo " -m - mode to run jtreg tests." - echo ' Should be one of `create`, `update`, `verify-install` or `verify-uninstall`.' + echo ' Should be one of `create`, `update` or `print-default-tests`.' echo ' Optional, default mode is `update`.' echo ' - `create`' echo ' Remove all package bundles from the output directory before running jtreg tests.' echo ' - `update`' echo ' Run jtreg tests and overrite existing package bundles in the output directory.' - echo ' - `verify-install`' - echo ' Verify installed packages created with the previous run of the script.' - echo ' - `verify-uninstall`' - echo ' Verify packages created with the previous run of the script were uninstalled cleanly.' echo ' - `print-default-tests`' echo ' Print default list of packaging tests and exit.' } @@ -135,7 +131,10 @@ # jtreg extra arguments declare -a jtreg_args -# Run all tests +# Create packages only +jtreg_args+=("-Djpackage.test.action=create") + +# run all tests run_all_tests= mapfile -t tests < <(find_all_packaging_tests) @@ -206,10 +205,6 @@ true elif [ "$mode" = update ]; then true -elif [ "$mode" = verify-install ]; then - jtreg_args+=("-Djpackage.test.action=$mode") -elif [ "$mode" = verify-uninstall ]; then - jtreg_args+=("-Djpackage.test.action=$mode") else fatal_with_help_usage 'Invalid value of -m option:' [$mode] fi @@ -218,7 +213,11 @@ jtreg_args+=(-Djpackage.test.SQETest=yes) fi -# All remaining command line arguments are tests to run that should override the defaults +# Drop arguments separator +[ "$1" != "--" ] || shift + +# All remaining command line arguments are tests to run +# that should override the defaults and explicit jtreg arguments [ $# -eq 0 ] || tests=($@)