aboutsummaryrefslogtreecommitdiffstats
path: root/utils/lit
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 09:01:22 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 09:01:22 +0000
commit18fac3c0d22dbdc9b7939042e2e20f443f700761 (patch)
tree722aa8c23e2a6e7eaac05a155d3cd89a7a182275 /utils/lit
parentee6944f4ab4258e6b7b9c91c0c18444193d6f55a (diff)
downloadexternal_llvm-18fac3c0d22dbdc9b7939042e2e20f443f700761.zip
external_llvm-18fac3c0d22dbdc9b7939042e2e20f443f700761.tar.gz
external_llvm-18fac3c0d22dbdc9b7939042e2e20f443f700761.tar.bz2
Test unittests built with CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r--utils/lit/lit/TestFormats.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py
index ce0e9a3..7662e14 100644
--- a/utils/lit/lit/TestFormats.py
+++ b/utils/lit/lit/TestFormats.py
@@ -9,7 +9,7 @@ kIsWindows = platform.system() == 'Windows'
class GoogleTest(object):
def __init__(self, test_sub_dir, test_suffix):
- self.test_sub_dir = str(test_sub_dir)
+ self.test_sub_dir = str(test_sub_dir).split(';')
self.test_suffix = str(test_suffix)
# On Windows, assume tests will also end in '.exe'.
@@ -28,7 +28,10 @@ class GoogleTest(object):
try:
lines = Util.capture([path, '--gtest_list_tests'],
- env=localConfig.environment).split('\n')
+ env=localConfig.environment)
+ if kIsWindows:
+ lines = lines.replace('\r', '')
+ lines = lines.split('\n')
except:
litConfig.error("unable to discover google-tests in %r" % path)
raise StopIteration
@@ -56,10 +59,13 @@ class GoogleTest(object):
source_path = testSuite.getSourcePath(path_in_suite)
for filename in os.listdir(source_path):
# Check for the one subdirectory (build directory) tests will be in.
- if filename != self.test_sub_dir:
+ if not filename in self.test_sub_dir:
continue
filepath = os.path.join(source_path, filename)
+ if not os.path.isdir(filepath):
+ continue
+
for subfilename in os.listdir(filepath):
if subfilename.endswith(self.test_suffix):
execpath = os.path.join(filepath, subfilename)