diff options
| author | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2015-02-09 13:54:51 +0000 |
|---|---|---|
| committer | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2015-02-09 13:54:51 +0000 |
| commit | 7f7df8cba83bb48adfde53298875187b5e817306 (patch) | |
| tree | 26672a19546bd427183306b67245fdd9407f6c42 | |
| parent | bc8a5e229018ad1c9ccb6721ff514bba26b2ff65 (diff) | |
| download | bcm5719-llvm-7f7df8cba83bb48adfde53298875187b5e817306.tar.gz bcm5719-llvm-7f7df8cba83bb48adfde53298875187b5e817306.zip | |
Fix test case failure on Linux.
The test case were failing becuase my test compiler was gcc. The generated
code behaved a bit differently to the how the test expected. Adjusted a few
lines so that it works on both gcc and clang.
llvm-svn: 228576
| -rw-r--r-- | lldb/test/tools/lldb-mi/TestMiExec.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/test/tools/lldb-mi/TestMiExec.py b/lldb/test/tools/lldb-mi/TestMiExec.py index aafb23a2635..e655c955a98 100644 --- a/lldb/test/tools/lldb-mi/TestMiExec.py +++ b/lldb/test/tools/lldb-mi/TestMiExec.py @@ -183,7 +183,6 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): @lldbmi_test @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") - @expectedFailureLinux("TODO: Figures why it is failing on Linux") def test_lldbmi_exec_next_instruction(self): """Test that 'lldb-mi --interpreter' works for instruction stepping.""" @@ -221,7 +220,8 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): # Test that both --thread and --frame are optional self.runCmd("-exec-next-instruction --thread 1") self.expect("\^running") - self.expect("\*stopped,reason=\"end-stepping-range\".*main.c\",line=\"22\"") + # Depending on compiler, it can stop at different line. + self.expect("\*stopped,reason=\"end-stepping-range\".*main.c\",line=\"2[0-2]\"") # Test that an invalid --thread is handled self.runCmd("-exec-next-instruction --thread 0") @@ -236,7 +236,6 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): @lldbmi_test @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") - @expectedFailureLinux("TODO: Figures why it is failing on Linux") def test_lldbmi_exec_step(self): """Test that 'lldb-mi --interpreter' works for stepping into.""" @@ -272,7 +271,9 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): self.runCmd("-exec-step --frame 0") self.expect("\^running") self.expect("\*stopped,reason=\"end-stepping-range\".*func=\"a_MyFunction\"") - self.runCmd("-exec-step --frame 0") + # Use -exec-finish here to make sure that control reaches the caller. + # -exec-step can keep us in the a_MyFunction for gcc + self.runCmd("-exec-finish --frame 0") self.expect("\^running") self.expect("\*stopped,reason=\"end-stepping-range\".*main.c\",line=\"22\"") self.runCmd("-exec-step --frame 0") |

