diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-08-20 21:03:09 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-08-20 21:03:09 +0000 |
commit | ff3d01d0b784b28d887e846b0368fbd954ede202 (patch) | |
tree | 49824106d9dcf6c756a8261c635adb5b15f371c2 /lldb/test/persistent_variables/TestPersistentVariables.py | |
parent | 2b2b79eddee48e5d415d2efe4aa11577a9361ce8 (diff) | |
download | bcm5719-llvm-ff3d01d0b784b28d887e846b0368fbd954ede202.tar.gz bcm5719-llvm-ff3d01d0b784b28d887e846b0368fbd954ede202.zip |
Print the verbose output of runCmd()/expect() to stderr instead of stdout.
And converted the rest of the test cases to runCmd()/expect().
llvm-svn: 111677
Diffstat (limited to 'lldb/test/persistent_variables/TestPersistentVariables.py')
-rw-r--r-- | lldb/test/persistent_variables/TestPersistentVariables.py | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/lldb/test/persistent_variables/TestPersistentVariables.py b/lldb/test/persistent_variables/TestPersistentVariables.py index 1c2de452838..64637e3c33f 100644 --- a/lldb/test/persistent_variables/TestPersistentVariables.py +++ b/lldb/test/persistent_variables/TestPersistentVariables.py @@ -13,38 +13,23 @@ class TestPersistentVariables(TestBase): def test_persistent_variables(self): """Test that lldb persistent variables works correctly.""" - res = self.res + self.runCmd("file ../array_types/a.out", CURRENT_EXECUTABLE_SET) - self.ci.HandleCommand("file ../array_types/a.out", res) - self.assertTrue(res.Succeeded(), CURRENT_EXECUTABLE_SET) + self.runCmd("breakpoint set --name main") - self.ci.HandleCommand("breakpoint set --name main", res) - self.assertTrue(res.Succeeded(), CMD_MSG('breakpoint set')) + self.runCmd("run", RUN_STOPPED) - self.ci.HandleCommand("run", res) - self.runStarted = True - self.assertTrue(res.Succeeded(), RUN_STOPPED) - - self.ci.HandleCommand("expr int $i = 5; $i + 1", res) - self.assertTrue(res.Succeeded(), CMD_MSG('expr int $i = 5; $i + 1')) - #print res.GetOutput() + self.runCmd("expr int $i = 5; $i + 1") # $0 = (int)6 - self.ci.HandleCommand("expr $i + 3", res) - self.assertTrue(res.Succeeded(), CMD_MSG('expr $i + 3')) - #print res.GetOutput() + self.runCmd("expr $i + 3") # $1 = (int)8 - self.ci.HandleCommand("expr $1 + $0", res) - self.assertTrue(res.Succeeded(), CMD_MSG('expr $1 + $0')) - #print res.GetOutput() + self.runCmd("expr $1 + $0") # $2 = (int)14 - self.ci.HandleCommand("expr $2", res) - self.assertTrue(res.Succeeded() and - res.GetOutput().startswith("$3 = (int) 14"), - CMD_MSG('expr $2')) - #print res.GetOutput() + self.expect("expr $2", + startstr = "$3 = (int) 14") # $3 = (int)14 |