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:
parent
842fa3f80d
commit
437f8f665a
|
@ -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'])
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue