From 1d9aa4d5144370e7e6bf7be2363acacf05b9b7b6 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 4 Sep 2014 14:19:51 -0700 Subject: [PATCH] ART: Fix host run-test script When using gdb, do not pipe and grep. GDB is interactive... Change-Id: Idd944a8ff7a8c254f47c840bc5b2c1e352e8b105 --- test/etc/host-run-test-jar | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar index 54a086574..448559017 100755 --- a/test/etc/host-run-test-jar +++ b/test/etc/host-run-test-jar @@ -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 -- 2.11.0