diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-09-09 18:43:24 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-09-09 18:43:24 +0000 |
| commit | 627d78f6c2c19e3539193213fd9700c697991acf (patch) | |
| tree | b4d3c79b7aa8a53c31a33dd93e716459772e0973 /compiler-rt/test/asan/android_commands/android_run.py | |
| parent | 22ce5eb051591b828b1ce4238624b6e95d334a5b (diff) | |
| download | bcm5719-llvm-627d78f6c2c19e3539193213fd9700c697991acf.tar.gz bcm5719-llvm-627d78f6c2c19e3539193213fd9700c697991acf.zip | |
[asan] Disable handle_abort in Android tests.
The same thing is already done on Mac. handle_abort slows down tests
significantly because it triggers tombstone collection on Android;
also, it changes failed test outcome from "not-crash" to "crash" (as
in "bin/not --crash").
This change adds handle_abort=0 to asan options on android (test
only!), and also tweaks android_run.py to semi-correctly pass the
crash/no-crash status to the caller.
llvm-svn: 281075
Diffstat (limited to 'compiler-rt/test/asan/android_commands/android_run.py')
| -rwxr-xr-x | compiler-rt/test/asan/android_commands/android_run.py | 9 |
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) |

