diff options
author | Elliott Hughes <enh@google.com> | 2011-10-19 18:16:03 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-10-19 18:16:03 -0700 |
commit | 7c04610d42cad31e6593ae1561ed855aceac1d7a (patch) | |
tree | 42c030ff5fc14983eca8dc85c87b5eb287c7634e | |
parent | c393a4f7c91534ac41a81d66b12c22e68df28fc7 (diff) | |
download | art-7c04610d42cad31e6593ae1561ed855aceac1d7a.tar.gz art-7c04610d42cad31e6593ae1561ed855aceac1d7a.tar.bz2 art-7c04610d42cad31e6593ae1561ed855aceac1d7a.zip |
Add --invoke-with and -d to the dalvik tests.
Change-Id: I358945fd2b41c1615441c1687a582a66e662eba9
-rwxr-xr-x | test/etc/host-run-test-jar | 20 | ||||
-rwxr-xr-x | test/etc/push-and-run-test-jar | 13 | ||||
-rwxr-xr-x | test/etc/reference-run-test-classes | 2 | ||||
-rwxr-xr-x | test/run-all-tests | 2 | ||||
-rwxr-xr-x | test/run-test | 11 |
5 files changed, 27 insertions, 21 deletions
diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar index ea20da5f65..1fba19d483 100755 --- a/test/etc/host-run-test-jar +++ b/test/etc/host-run-test-jar @@ -6,7 +6,6 @@ # Options: # --quiet -- don't chatter # --debug -- wait for debugger to attach -# --valgrind -- use valgrind # --no-verify -- turn off verification (on by default) # --no-optimize -- turn off optimization (on by default) @@ -20,7 +19,7 @@ DEBUG="n" GDB="n" VERIFY="y" OPTIMIZE="y" -VALGRIND="n" +INVOKE_WITH="" DEV_MODE="n" QUIET="n" @@ -34,8 +33,9 @@ while true; do elif [ "x$1" = "x--gdb" ]; then GDB="y" shift - elif [ "x$1" = "x--valgrind" ]; then - VALGRIND="y" + elif [ "x$1" = "x--invoke-with" ]; then + shift + INVOKE_WITH="$1" shift elif [ "x$1" = "x--dev" ]; then DEV_MODE="y" @@ -50,7 +50,7 @@ while true; do shift break elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown option: $1" 1>&2 + echo "unknown $0 option: $1" 1>&2 exit 1 else break @@ -77,14 +77,6 @@ else msg "Skipping verification" fi -if [ "$VALGRIND" = "y" ]; then - msg "Running with valgrind" - valgrind_cmd="valgrind" - #valgrind_cmd="valgrind --leak-check=full" -else - valgrind_cmd="" -fi - msg "------------------------------" HOSTBASE="${ANDROID_BUILD_TOP}/out/host" @@ -123,6 +115,6 @@ if [ "$GDB" = "y" ]; then gdbargs="--args $exe" fi -$valgrind_cmd $gdb $exe $gdbargs "-Xbootclasspath:${bpath}" \ +$INVOKE_WITH $gdb $exe $gdbargs "-Xbootclasspath:${bpath}" \ $DEX_VERIFY $DEX_OPTIMIZE $DEX_DEBUG -ea \ -cp test.jar Main "$@" diff --git a/test/etc/push-and-run-test-jar b/test/etc/push-and-run-test-jar index bcc0cebbc2..858ba748a9 100755 --- a/test/etc/push-and-run-test-jar +++ b/test/etc/push-and-run-test-jar @@ -18,17 +18,22 @@ msg() { fi } +OATEXEC="oatexec" DEBUG="n" VERIFY="y" OPTIMIZE="y" ZYGOTE="n" QUIET="n" DEV_MODE="n" +INVOKE_WITH="" while true; do if [ "x$1" = "x--quiet" ]; then QUIET="y" shift + elif [ "x$1" = "x-d" ]; then + OATEXEC="oatexecd" + shift elif [ "x$1" = "x--debug" ]; then DEBUG="y" shift @@ -39,6 +44,10 @@ while true; do elif [ "x$1" = "x--dev" ]; then DEV_MODE="y" shift + elif [ "x$1" = "x--invoke-with" ]; then + shift + INVOKE_WITH="$1" + shift elif [ "x$1" = "x--no-verify" ]; then VERIFY="n" shift @@ -49,7 +58,7 @@ while true; do shift break elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown option: $1" 1>&2 + echo "unknown $0 option: $1" 1>&2 exit 1 else break @@ -99,7 +108,7 @@ fi if [ "$ZYGOTE" = "y" ]; then adb shell cd /data \; dvz -classpath $TEST_NAME.jar Main "$@" else - cmdline="cd /data; oatexecd -Xjnigreflimit:256 \ + cmdline="cd /data; $INVOKE_WITH $OATEXEC -Xjnigreflimit:256 \ -Ximage:/data/art-test/core.art \ -cp /data/art-test/$TEST_NAME.jar \ Main" diff --git a/test/etc/reference-run-test-classes b/test/etc/reference-run-test-classes index 94c805066e..b16d9ff206 100755 --- a/test/etc/reference-run-test-classes +++ b/test/etc/reference-run-test-classes @@ -36,7 +36,7 @@ while true; do shift break elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown option: $1" 1>&2 + echo "unknown $0 option: $1" 1>&2 exit 1 else break diff --git a/test/run-all-tests b/test/run-all-tests index ce284577cc..bd5eea310b 100755 --- a/test/run-all-tests +++ b/test/run-all-tests @@ -68,7 +68,7 @@ while true; do usage="yes" shift elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown option: $1" 1>&2 + echo "unknown $0 option: $1" 1>&2 usage="yes" break else diff --git a/test/run-test b/test/run-test index b80fbd9cc2..08da171e85 100755 --- a/test/run-test +++ b/test/run-test @@ -57,6 +57,9 @@ while true; do elif [ "x$1" = "x--reference" ]; then RUN="${progdir}/etc/reference-run-test-classes" shift + elif [ "x$1" = "x-d" ]; then + run_args="${run_args} -d" + shift elif [ "x$1" = "x--debug" ]; then run_args="${run_args} --debug" shift @@ -76,8 +79,10 @@ while true; do elif [ "x$1" = "x--no-precise" ]; then run_args="${run_args} --no-precise" shift - elif [ "x$1" = "x--valgrind" ]; then - run_args="${run_args} --valgrind" + elif [ "x$1" = "x--invoke-with" ]; then + shift + what="$1" + run_args="${run_args} --invoke-with \"${what}\"" shift elif [ "x$1" = "x--dev" ]; then run_args="${run_args} --dev" @@ -90,7 +95,7 @@ while true; do usage="yes" shift elif expr "x$1" : "x--" >/dev/null 2>&1; then - echo "unknown option: $1" 1>&2 + echo "unknown $0 option: $1" 1>&2 usage="yes" break else |