Add test skips for run-libjdwp-tests.sh

Several tests in the apache-harmony suite will cause crashes when run
using the libjdwp agent (both on ART and the RI). To prevent these
from cluttering the buildbot logs this adds explicit skips for all 5
of them. The list of crashing tests is not expected to ever change.

Also added --no-skips flag to still run the skips.

Test: ./art/tools/run-libjdwp-tests.sh --mode=host
Bug: 141907697
Change-Id: I42c5ec3d0c6593a5b7d5f60cda106c9b09d0b627
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
index da89403..9f1d2a7 100755
--- a/tools/run-jdwp-tests.sh
+++ b/tools/run-jdwp-tests.sh
@@ -93,6 +93,7 @@
 # continuous testing. This value can be adjusted to fit the configuration of the host machine(s).
 jdwp_test_timeout=10000
 
+skip_tests=
 gdb_target=
 has_gdb="no"
 
@@ -145,6 +146,14 @@
     # We don't care about jit with the RI
     use_jit=false
     shift
+  elif [[ $1 == --skip-test ]]; then
+    skip_tests="${skip_tests},${2}"
+    # remove the --skip-test
+    args=${args/$1}
+    shift
+    # remove the arg
+    args=${args/$1}
+    shift
   elif [[ $1 == --force-run-test ]]; then
     run_internal_jdwp_test=true
     # remove the --force-run-test
@@ -422,6 +431,7 @@
       --vm-arg -Djpda.settings.transportAddress=127.0.0.1:55107 \
       --vm-arg -Djpda.settings.dumpProcess="$dump_command" \
       --vm-arg -Djpda.settings.debuggeeJavaPath="$art_debugee $plugin $debuggee_args" \
+      --vm-arg -Djpda.settings.badTestCases="$skip_tests" \
       --classpath "$test_jar" \
       $toolchain_args \
       $test