diff options
author | Siva Chandra <sivachandra@google.com> | 2015-05-27 22:27:41 +0000 |
---|---|---|
committer | Siva Chandra <sivachandra@google.com> | 2015-05-27 22:27:41 +0000 |
commit | 3154aa23f31f2f78f251b70f7a9b3dfb54a596cc (patch) | |
tree | 43e14f5d3b9cd5cc05e26f02f7f28f369713bda0 /lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py | |
parent | e7e1d0c706826a009698341e36f8c5a44ff1571c (diff) | |
download | bcm5719-llvm-3154aa23f31f2f78f251b70f7a9b3dfb54a596cc.tar.gz bcm5719-llvm-3154aa23f31f2f78f251b70f7a9b3dfb54a596cc.zip |
[TestBase.runCmd] Better error message when runCmd fails.
Summary:
Before:
AssertionError: False is not True : Process is launched successfully
After:
AssertionError: False is not True : Command 'run a.out' failed.
>>> error: invalid target, create a target using the 'target create' command
>>> Process could not be launched successfully
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, vharron
Differential Revision: http://reviews.llvm.org/D9948
llvm-svn: 238363
Diffstat (limited to 'lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py')
-rw-r--r-- | lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py index 7a9648d98a3..c31816fd0d0 100644 --- a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py +++ b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py @@ -111,7 +111,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) stop_reason = self.check_stop_reason() # And it should report a backtrace that includes main and the crash site. @@ -151,7 +151,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) self.check_stop_reason() # lldb should be able to read from registers from the inferior after crashing. @@ -162,7 +162,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) self.check_stop_reason() # The lldb expression interpreter should be able to read from addresses of the inferior after a crash. @@ -175,7 +175,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) self.set_breakpoint(self.line) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, substrs = ['main.c:%d' % self.line, @@ -201,7 +201,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) self.check_stop_reason() expected_state = 'exited' # Provide the exit code. @@ -221,7 +221,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.runCmd("run", RUN_SUCCEEDED) + self.runCmd("run", RUN_FAILED) self.check_stop_reason() # The lldb expression interpreter should be able to read from addresses of the inferior after a crash. |