diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-10-17 15:58:01 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-12-02 11:04:39 -0800 |
commit | c0a8a80a3d45aa6040ce6c10108bcb96a14dc9c6 (patch) | |
tree | d25be01706b9cef5a4e53009d6d4d6360ee1f240 /test/etc | |
parent | e7106cbcfcbb07d11948dbc45d2719d32e5e3908 (diff) | |
download | art-c0a8a80a3d45aa6040ce6c10108bcb96a14dc9c6.zip art-c0a8a80a3d45aa6040ce6c10108bcb96a14dc9c6.tar.gz art-c0a8a80a3d45aa6040ce6c10108bcb96a14dc9c6.tar.bz2 |
Add a way to pass GDB commands
Passing --gdb-arg to run-test sends the arg to GDB, example:
test/run-test --host --gdb --gdb-arg "--command=command.txt" 001-HelloWorld
Would run the test with the GDB script at command.txt on the host, this is
useful for running tests in GDB in a loop.
Bug: 17387969
Change-Id: I5ad455159a6d92783eacb17eecbb0f1e670cb4a3
Diffstat (limited to 'test/etc')
-rwxr-xr-x | test/etc/run-test-jar | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index d2cd8ab..5c0f83f 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -108,6 +108,11 @@ while true; do DEV_MODE="y" TIME_OUT="n" shift + elif [ "x$1" = "x--gdb-arg" ]; then + shift + gdb_arg="$1" + GDB_ARGS="${GDB_ARGS} $gdb_arg" + shift elif [ "x$1" = "x--zygote" ]; then ZYGOTE="-Xzygote" msg "Spawning from zygote" @@ -229,11 +234,11 @@ if [ "$USE_GDB" = "y" ]; then else if [ `uname` = "Darwin" ]; then GDB=lldb - GDB_ARGS="-- $DALVIKVM" + GDB_ARGS="$GDB_ARGS -- $DALVIKVM" DALVIKVM= else GDB=gdb - GDB_ARGS="--args $DALVIKVM" + GDB_ARGS="$GDB_ARGS --args $DALVIKVM" # Enable for Emacs "M-x gdb" support. TODO: allow extra gdb arguments on command line. # gdbargs="--annotate=3 $gdbargs" fi |