llvm.org GIT mirror llvm / 18fac3c
Test unittests built with CMake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114726 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 8 years ago
1 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
88
99 class GoogleTest(object):
1010 def __init__(self, test_sub_dir, test_suffix):
11 self.test_sub_dir = str(test_sub_dir)
11 self.test_sub_dir = str(test_sub_dir).split(';')
1212 self.test_suffix = str(test_suffix)
1313
1414 # On Windows, assume tests will also end in '.exe'.
2727
2828 try:
2929 lines = Util.capture([path, '--gtest_list_tests'],
30 env=localConfig.environment).split('\n')
30 env=localConfig.environment)
31 if kIsWindows:
32 lines = lines.replace('\r', '')
33 lines = lines.split('\n')
3134 except:
3235 litConfig.error("unable to discover google-tests in %r" % path)
3336 raise StopIteration
5558 source_path = testSuite.getSourcePath(path_in_suite)
5659 for filename in os.listdir(source_path):
5760 # Check for the one subdirectory (build directory) tests will be in.
58 if filename != self.test_sub_dir:
61 if not filename in self.test_sub_dir:
5962 continue
6063
6164 filepath = os.path.join(source_path, filename)
65 if not os.path.isdir(filepath):
66 continue
67
6268 for subfilename in os.listdir(filepath):
6369 if subfilename.endswith(self.test_suffix):
6470 execpath = os.path.join(filepath, subfilename)