ART: Fix signal_dumper detection in run-test

Fix the testing APEX name to com.android.art.

If asked to run under chroot, only look into paths under the chroot. That
means we can no longer use PATH lookup as fallback. Hardcode /system/bin
instead.

Bug: 140935398
Test: chroot test
Change-Id: Ief33714c0662ff4b254f8bcc556b8be558d92e2c
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 750735d..37210cf 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -1067,15 +1067,20 @@
 
     # Check whether signal_dumper is available.
     if [ "$TIMEOUT_DUMPER" = signal_dumper ] ; then
+      # Chroot? Use as prefix for tests.
+      TIMEOUT_DUMPER_PATH_PREFIX=
+      if [ -n "$CHROOT" ]; then
+        TIMEOUT_DUMPER_PATH_PREFIX="$CHROOT/"
+      fi
+
       # Testing APEX?
-      if adb shell 'test -e /apex/com.android.art.testing/bin/signal_dumper' ; then
-        TIMEOUT_DUMPER="/apex/com.android.art.testing/bin/signal_dumper"
-      # Fallback: is it in PATH?
+      if adb shell "test -e ${TIMEOUT_DUMPER_PATH_PREFIX}/apex/com.android.art/bin/signal_dumper" ; then
+        TIMEOUT_DUMPER="/apex/com.android.art/bin/signal_dumper"
+      # Is it in /system/bin?
+      elif adb shell "test -e ${TIMEOUT_DUMPER_PATH_PREFIX}/system/bin/signal_dumper" ; then
+        TIMEOUT_DUMPER="/system/bin/signal_dumper"
       else
-        TIMEOUT_DUMPER=$(adb shell which signal_dumper)
-        if [ $? -ne 0 ] ; then
-          TIMEOUT_DUMPER=
-        fi
+        TIMEOUT_DUMPER=
       fi
     else
       TIMEOUT_DUMPER=