test: Handle libc++ shared lib name on FreeBSD

(I didn't take a guess at the Linux names, as these tests are currently
skipped with the comment "No standard locations for libc++ on Linux.")

llvm-svn: 190307
This commit is contained in:
Ed Maste 2013-09-09 14:04:04 +00:00
parent 842fa3f80d
commit 437f8f665a
6 changed files with 11 additions and 5 deletions

View File

@ -57,7 +57,7 @@ class LibcxxIteratorDataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
self.expect('image list', substrs = self.getLibcPlusPlusLibs())
self.expect('frame variable ivI', substrs = ['item = 3'])
self.expect('expr ivI', substrs = ['item = 3'])

View File

@ -55,7 +55,7 @@ class LibcxxMapDataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
self.expect('image list', substrs = self.getLibcPlusPlusLibs())
self.runCmd("frame variable ii --show-types")

View File

@ -55,7 +55,7 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
self.expect('image list', substrs = self.getLibcPlusPlusLibs())
self.runCmd("frame variable ii --show-types")

View File

@ -55,7 +55,7 @@ class LibcxxMultiSetDataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
self.expect('image list', substrs = self.getLibcPlusPlusLibs())
self.expect("frame variable ii",substrs = ["size=0","{}"])
self.runCmd("continue")

View File

@ -55,7 +55,7 @@ class LibcxxSetDataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
self.expect('image list', substrs = self.getLibcPlusPlusLibs())
self.expect("frame variable ii",substrs = ["size=0","{}"])
self.runCmd("continue")

View File

@ -1444,6 +1444,12 @@ class Base(unittest2.TestCase):
else:
return self.lib_dir
def getLibcPlusPlusLibs(self):
if sys.platform.startswith('freebsd'):
return ['libc++.so.1']
else:
return ['libc++.1.dylib','libc++abi.dylib']
class TestBase(Base):
"""
This abstract base class is meant to be subclassed. It provides default