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
diff --git a/tools/run-libjdwp-tests.sh b/tools/run-libjdwp-tests.sh
index c11dc84..b816aab 100755
--- a/tools/run-libjdwp-tests.sh
+++ b/tools/run-libjdwp-tests.sh
@@ -24,6 +24,17 @@
exit 2
fi
+# See b/141907697. These tests all crash on both the RI and ART when using the libjdwp agent JDWP
+# implementation. To avoid them cluttering the log on the buildbot we explicitly skip them. This
+# list should not be added to.
+declare -a known_bad_tests=(
+ 'org.apache.harmony.jpda.tests.jdwp.ClassType_NewInstanceTest#testNewInstance002'
+ 'org.apache.harmony.jpda.tests.jdwp.ObjectReference_GetValues002Test#testGetValues002'
+ 'org.apache.harmony.jpda.tests.jdwp.ObjectReference_SetValuesTest#testSetValues001'
+ 'org.apache.harmony.jpda.tests.jdwp.ThreadGroupReference_NameTest#testName001_NullObject'
+ 'org.apache.harmony.jpda.tests.jdwp.ThreadGroupReference_ParentTest#testParent_NullObject'
+)
+
declare -a args=("$@")
debug="no"
has_variant="no"
@@ -58,6 +69,10 @@
verbose_level=0xFFF
unset args[arg_idx]
shift
+ elif [[ $1 == --no-skips ]]; then
+ declare -a known_bad_tests=()
+ unset args[arg_idx]
+ shift
elif [[ $1 == --verbose ]]; then
has_verbose="yes"
shift
@@ -118,6 +133,10 @@
env "$@"
}
+for skip in "${known_bad_tests[@]}"; do
+ args+=("--skip-test" "$skip")
+done
+
# Tell run-jdwp-tests.sh it was called from run-libjdwp-tests.sh
export RUN_JDWP_TESTS_CALLED_FROM_LIBJDWP=true