summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan/android_commands/android_run.py
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/asan/android_commands/android_run.py')
-rwxr-xr-xcompiler-rt/test/asan/android_commands/android_run.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/android_commands/android_run.py b/compiler-rt/test/asan/android_commands/android_run.py
index 272d2110e5a..9f7bdeef577 100755
--- a/compiler-rt/test/asan/android_commands/android_run.py
+++ b/compiler-rt/test/asan/android_commands/android_run.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import os, sys, subprocess, tempfile
+import os, signal, sys, subprocess, tempfile
from android_common import *
ANDROID_TMPDIR = '/data/local/tmp/Output'
@@ -34,4 +34,9 @@ if ret != 0:
sys.stdout.write(pull_from_device(device_stdout))
sys.stderr.write(pull_from_device(device_stderr))
-sys.exit(int(pull_from_device(device_exitcode)))
+retcode = int(pull_from_device(device_exitcode))
+# If the device process died with a signal, do abort().
+# Not exactly the same, but good enough to fool "not --crash".
+if retcode > 128:
+ os.kill(os.getpid(), signal.SIGABRT)
+sys.exit(retcode)
OpenPOWER on IntegriCloud