OSDN Git Service

ART: Fix host run-test script
authorAndreas Gampe <agampe@google.com>
Thu, 4 Sep 2014 21:19:51 +0000 (14:19 -0700)
committerAndreas Gampe <agampe@google.com>
Thu, 4 Sep 2014 21:21:07 +0000 (14:21 -0700)
When using gdb, do not pipe and grep. GDB is interactive...

Change-Id: Idd944a8ff7a8c254f47c840bc5b2c1e352e8b105

test/etc/host-run-test-jar

index 54a0865..4485590 100755 (executable)
@@ -208,7 +208,16 @@ if [ "$DEV_MODE" = "y" ]; then
 fi
 
 cd $ANDROID_BUILD_TOP
-# If we are execing /bin/false we might not be on the same ISA as libsigchain.so
-# ld.so will helpfully warn us of this. Unfortunately this messes up our error
-# checking so we will just filter out the error with a grep.
-$mkdir_cmd && $prebuild_cmd && LD_PRELOAD=libsigchain.so $cmdline "$@" 2>&1 | grep -v -E "^ERROR: ld\.so: object '.+\.so' from LD_PRELOAD cannot be preloaded: ignored\.$"
+
+$mkdir_cmd || exit 1
+$prebuild_cmd || exit 2
+
+if [ "$GDB" = "y" ]; then
+  # When running under gdb, we cannot do piping and grepping...
+  LD_PRELOAD=libsigchain.so $cmdline "$@"
+else
+  # If we are execing /bin/false we might not be on the same ISA as libsigchain.so
+  # ld.so will helpfully warn us of this. Unfortunately this messes up our error
+  # checking so we will just filter out the error with a grep.
+  LD_PRELOAD=libsigchain.so $cmdline "$@" 2>&1 | grep -v -E "^ERROR: ld\.so: object '.+\.so' from LD_PRELOAD cannot be preloaded: ignored\.$"
+fi
\ No newline at end of file