Modify test_image_search_paths(self) to check for the pattern "%s-[^-]*-[^-]*" % self.getArchitecture()

from the output of running 'image list -t 3' command which lists the triples of the image list.

llvm-svn: 130777
This commit is contained in:
Johnny Chen
2011-05-03 18:53:19 +00:00
parent ffe4ec45f3
commit c8170f95fb

View File

@@ -49,8 +49,11 @@ class LoadUnloadTestCase(TestBase):
exe = os.path.join(os.getcwd(), "a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
print "Architecture to test for:", self.getArchitecture()
self.expect("image list",
substrs = [old_dylib])
self.expect("image list -t 3",
patterns = ["%s-[^-]*-[^-]*" % self.getArchitecture()])
self.runCmd("target image-search-paths add %s %s" % (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"))