aboutsummaryrefslogtreecommitdiff
path: root/tests/test_art_simulator.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_art_simulator.sh')
-rwxr-xr-xtests/test_art_simulator.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/test_art_simulator.sh b/tests/test_art_simulator.sh
index 320c4a94..473b54bb 100755
--- a/tests/test_art_simulator.sh
+++ b/tests/test_art_simulator.sh
@@ -64,6 +64,7 @@ usage() {
generation."
log I " --dump-cfg <path> - dump .cfg to the specified host full path. Only runs for a"
log I " single test"
+ log I " --gdb - Run dalvikvm under gdb. Only runs for a single test."
log I " --gdb-dex2oat - Run dex2oat under lldb. Only runs for a single test."
log I " --gdb-dex2oat-args - Use LLDB with arguments to debug the compiler (dex2oat)
Each argument needs to be separated by a semicolon."
@@ -82,6 +83,7 @@ declare -A options_format=(
["sve"]="false"
["s"]="r:&sve"
["dump-cfg"]=""
+ ["gdb"]="false"
["gdb-dex2oat"]="false"
["gdb-dex2oat-args"]=""
["gcstress"]="false"
@@ -107,9 +109,17 @@ validate_options() {
exit 1
fi
- if [[ "${options["gdb-dex2oat"]}" == "true" ]] && [[ -z "${options["single-test"]}" ]]; then
- log E "Can only run the debugger on dex2oat for a single test."
- exit 1
+ if [[ "${options["gdb"]}" == "true" || "${options["gdb-dex2oat"]}" == "true" ]]; then
+ if [[ -z "${options["single-test"]}" ]]; then
+ log E "Can only run the debugger for a single test."
+ exit 1
+ fi
+
+ local -r test_name="${options["single-test"]}"
+ if is_single_test_gtest "${test_name}"; then
+ log E "Can't run the debugger for a gtest."
+ exit 1
+ fi
fi
}