diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-05-06 23:59:10 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-05-06 23:59:10 +0000 |
commit | 32103ac2a97c85b0c6c3d4388c9fd25eced831b4 (patch) | |
tree | 8710943218de839d14e072f401423265fc978b55 | |
parent | 0de016dbb7c774dce539e6f85023a2e2422ec684 (diff) | |
download | bcm5719-llvm-32103ac2a97c85b0c6c3d4388c9fd25eced831b4.tar.gz bcm5719-llvm-32103ac2a97c85b0c6c3d4388c9fd25eced831b4.zip |
Modify the test case related to "target modules search-paths" as it suffers from code rotting.
llvm-svn: 131038
-rw-r--r-- | lldb/test/load_unload/TestLoadUnload.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lldb/test/load_unload/TestLoadUnload.py b/lldb/test/load_unload/TestLoadUnload.py index a9ee28d36af..face35e9a44 100644 --- a/lldb/test/load_unload/TestLoadUnload.py +++ b/lldb/test/load_unload/TestLoadUnload.py @@ -21,8 +21,8 @@ class LoadUnloadTestCase(TestBase): self.line_d_function = line_number('d.c', '// Find this line number within d_dunction().') - def test_image_search_paths(self): - """Test image list after moving libd.dylib, and verifies that it works with 'target image-search-paths add'.""" + def test_modules_search_paths(self): + """Test target modules list after moving libd.dylib, and verifies that it works with 'target modules search-paths add'.""" # Invoke the default build rule. self.buildDefault() @@ -50,14 +50,18 @@ class LoadUnloadTestCase(TestBase): exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) - self.expect("image list", + self.expect("target modules list", substrs = [old_dylib]) - self.expect("image list -t 3", + self.expect("target modules list -t 3", patterns = ["%s-[^-]*-[^-]*" % self.getArchitecture()]) - self.runCmd("target image-search-paths add %s %s" % (os.getcwd(), new_dir)) + self.runCmd("target modules search-paths add %s %s" % (os.getcwd(), new_dir)) + + self.expect("target modules search-paths list", + substrs = [os.getcwd(), new_dir]) + # Add teardown hook to clear image-search-paths after the test. - self.addTearDownHook(lambda: self.runCmd("target image-search-paths clear")) - self.expect("image list", "LLDB successfully locates the relocated dynamic library", + self.addTearDownHook(lambda: self.runCmd("target modules search-paths clear")) + self.expect("target modules list", "LLDB successfully locates the relocated dynamic library", substrs = [new_dylib]) |