diff options
Diffstat (limited to 'lldb/test/Shell/Quit/expect_exit_code.py')
-rwxr-xr-x | lldb/test/Shell/Quit/expect_exit_code.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/test/Shell/Quit/expect_exit_code.py b/lldb/test/Shell/Quit/expect_exit_code.py new file mode 100755 index 00000000000..32b2e29d53d --- /dev/null +++ b/lldb/test/Shell/Quit/expect_exit_code.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import subprocess +import sys + +args = sys.argv + +expected_exit_code = args[1] + +args = args[2:] +print("Running " + (" ".join(args))) +real_exit_code = subprocess.call(args) + +if str(real_exit_code) != expected_exit_code: + print("Got exit code %d but expected %s" % (real_exit_code, expected_exit_code)) + exit(1) |