Fix broken test suite on Windows after r223091.

Differential Revision: http://reviews.llvm.org/D6484
Reviewed by: Oleksiy Vyalov

llvm-svn: 223155
This commit is contained in:
Zachary Turner 2014-12-02 21:32:44 +00:00
parent 4df465bd5e
commit be40b2f1b2
1 changed files with 6 additions and 3 deletions

View File

@ -748,6 +748,8 @@ class Base(unittest2.TestCase):
cls.platformContext = _PlatformContext('DYLD_LIBRARY_PATH', 'lib', 'dylib') cls.platformContext = _PlatformContext('DYLD_LIBRARY_PATH', 'lib', 'dylib')
elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
cls.platformContext = _PlatformContext('LD_LIBRARY_PATH', 'lib', 'so') cls.platformContext = _PlatformContext('LD_LIBRARY_PATH', 'lib', 'so')
else:
cls.platformContext = None
@classmethod @classmethod
def tearDownClass(cls): def tearDownClass(cls):
@ -914,6 +916,7 @@ class Base(unittest2.TestCase):
# See HideStdout(self). # See HideStdout(self).
self.sys_stdout_hidden = False self.sys_stdout_hidden = False
if self.platformContext:
# set environment variable names for finding shared libraries # set environment variable names for finding shared libraries
self.dylibPath = self.platformContext.shlib_environment_var self.dylibPath = self.platformContext.shlib_environment_var
@ -1683,7 +1686,7 @@ class TestBase(Base):
shared libraries with the target and sets their remote install locations so they will shared libraries with the target and sets their remote install locations so they will
be uploaded when the target is run. be uploaded when the target is run.
''' '''
if not shlibs: if not shlibs or not self.platformContext:
return None return None
shlib_environment_var = self.platformContext.shlib_environment_var shlib_environment_var = self.platformContext.shlib_environment_var