diff options
| -rwxr-xr-x | tools/run-jdwp-tests.sh | 22 | ||||
| -rwxr-xr-x | tools/run-libjdwp-tests.sh | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh index e686d7da92..da89403a6d 100755 --- a/tools/run-jdwp-tests.sh +++ b/tools/run-jdwp-tests.sh @@ -80,6 +80,12 @@ use_jit=true instant_jit=false variant_cmdline_parameter="--variant=X32" dump_command="/bin/true" +called_from_libjdwp=${RUN_JDWP_TESTS_CALLED_FROM_LIBJDWP:-false} +run_internal_jdwp_test=false +# Let LUCI bots do what they want. +if test -v LUCI_CONTEXT; then + run_internal_jdwp_test=true +fi # Timeout of JDWP test in ms. # # Note: some tests expect a timeout to check that *no* reply/event is received for a specific case. @@ -123,6 +129,7 @@ while true; do elif [[ "$1" == "--mode=jvm" ]]; then mode="ri" make_target_name="apache-harmony-jdwp-tests" + run_internal_jdwp_test=true art="$(which java)" art_debugee="$(which java)" # No need for extra args. @@ -138,6 +145,11 @@ while true; do # We don't care about jit with the RI use_jit=false shift + elif [[ $1 == --force-run-test ]]; then + run_internal_jdwp_test=true + # remove the --force-run-test + args=${args/$1} + shift elif [[ $1 == --test-timeout-ms ]]; then # Remove the --test-timeout-ms from the arguments. args=${args/$1} @@ -237,6 +249,16 @@ if [[ $mode == "target" ]]; then fi fi +if [[ $called_from_libjdwp != "true" ]]; then + if [[ $run_internal_jdwp_test = "false" ]]; then + echo "Calling run_jdwp_tests.sh directly is probably not what you want. You probably want to" + echo "run ./art/tools/run-libjdwp-tests.sh instead in order to test the JDWP implementation" + echo "used by apps. If you really wish to run these tests using the deprecated internal JDWP" + echo "implementation pass the '--force-run-test' flag." + exit 1 + fi +fi + if [[ $has_gdb = "yes" ]]; then if [[ $explicit_debug = "no" ]]; then debug="yes" diff --git a/tools/run-libjdwp-tests.sh b/tools/run-libjdwp-tests.sh index 0bea6a5fe3..d514c0c9bc 100755 --- a/tools/run-libjdwp-tests.sh +++ b/tools/run-libjdwp-tests.sh @@ -118,6 +118,9 @@ function verbose_run() { env "$@" } +# Tell run-jdwp-tests.sh it was called from run-libjdwp-tests.sh +export RUN_JDWP_TESTS_CALLED_FROM_LIBJDWP=true + verbose_run ./art/tools/run-jdwp-tests.sh \ "${args[@]}" \ --jdwp-path "libjdwp.so" \ |