diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-08-19 04:08:56 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-08-19 04:08:56 +0000 |
commit | 464be90e6d0dd98b1e8f1cc55e05b260fa81d20b (patch) | |
tree | 75c778b71f10199a37fdd55a4e5827dac29d78f6 /lldb/test/lang/cpp | |
parent | 21851d2b4504c086df5aced9edded65e40d3b7c1 (diff) | |
download | bcm5719-llvm-464be90e6d0dd98b1e8f1cc55e05b260fa81d20b.tar.gz bcm5719-llvm-464be90e6d0dd98b1e8f1cc55e05b260fa81d20b.zip |
Fix TestCppNsImport and TestCppScope for remote tests.
llvm-svn: 245412
Diffstat (limited to 'lldb/test/lang/cpp')
-rw-r--r-- | lldb/test/lang/cpp/nsimport/TestCppNsImport.py | 16 | ||||
-rw-r--r-- | lldb/test/lang/cpp/scope/TestCppScope.py | 20 |
2 files changed, 18 insertions, 18 deletions
diff --git a/lldb/test/lang/cpp/nsimport/TestCppNsImport.py b/lldb/test/lang/cpp/nsimport/TestCppNsImport.py index 328c9d09027..dcb7a784fd9 100644 --- a/lldb/test/lang/cpp/nsimport/TestCppNsImport.py +++ b/lldb/test/lang/cpp/nsimport/TestCppNsImport.py @@ -6,9 +6,9 @@ from lldbtest import * import lldbutil class TestCppNsImport(TestBase): - + mydir = TestBase.compute_mydir(__file__) - + @skipUnlessDarwin @dsym_test def test_with_dsym_and_run_command(self): @@ -32,12 +32,12 @@ class TestCppNsImport(TestBase): src_file = "main.cpp" src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "Main source file") - + # Get the path of the executable - cwd = os.getcwd() + cwd = os.getcwd() exe_file = "a.out" exe_path = os.path.join(cwd, exe_file) - + # Load the executable target = self.dbg.CreateTarget(exe_path) self.assertTrue(target.IsValid(), VALID_TARGET) @@ -49,20 +49,20 @@ class TestCppNsImport(TestBase): # Launch the process args = None env = None - process = target.LaunchSimple(args, env, cwd) + process = target.LaunchSimple(args, env, self.get_process_working_directory()) self.assertTrue(process.IsValid(), PROCESS_IS_VALID) # Get the thread of the process self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) - # Get current fream of the thread at the breakpoint + # Get current fream of the thread at the breakpoint frame = thread.GetSelectedFrame() # Test imported namespaces test_result = frame.EvaluateExpression("x") self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 11, "x = 11") - + test_result = frame.EvaluateExpression("xx") self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 22, "xx = 22") diff --git a/lldb/test/lang/cpp/scope/TestCppScope.py b/lldb/test/lang/cpp/scope/TestCppScope.py index 13906f370e9..49b16ac97cd 100644 --- a/lldb/test/lang/cpp/scope/TestCppScope.py +++ b/lldb/test/lang/cpp/scope/TestCppScope.py @@ -6,9 +6,9 @@ from lldbtest import * import lldbutil class TestCppScopes(TestBase): - + mydir = TestBase.compute_mydir(__file__) - + @skipUnlessDarwin @dsym_test def test_with_dsym_and_run_command(self): @@ -28,12 +28,12 @@ class TestCppScopes(TestBase): src_file = "main.cpp" src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "Main source file") - + # Get the path of the executable - cwd = os.getcwd() + cwd = os.getcwd() exe_file = "a.out" exe_path = os.path.join(cwd, exe_file) - + # Load the executable target = self.dbg.CreateTarget(exe_path) self.assertTrue(target.IsValid(), VALID_TARGET) @@ -45,20 +45,20 @@ class TestCppScopes(TestBase): # Launch the process args = None env = None - process = target.LaunchSimple(args, env, cwd) + process = target.LaunchSimple(args, env, self.get_process_working_directory()) self.assertTrue(process.IsValid(), PROCESS_IS_VALID) # Get the thread of the process self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) - # Get current fream of the thread at the breakpoint + # Get current fream of the thread at the breakpoint frame = thread.GetSelectedFrame() - # Test result for scopes of variables + # Test result for scopes of variables global_variables = frame.GetVariables(True, True, True, False) - global_variables_assert = { + global_variables_assert = { 'A::a': 1111, 'B::a': 2222, 'C::a': 3333, @@ -68,7 +68,7 @@ class TestCppScopes(TestBase): self.assertTrue(global_variables.GetSize() == 4, "target variable returns all variables") for variable in global_variables: - name = variable.GetName() + name = variable.GetName() self.assertTrue(name in global_variables_assert, "target variable returns wrong variable " + name) for name in global_variables_assert: |