summaryrefslogtreecommitdiffstats
path: root/libcxx/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/lit.cfg')
-rw-r--r--libcxx/test/lit.cfg9
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
index 023ac4a1189..37f6357b914 100644
--- a/libcxx/test/lit.cfg
+++ b/libcxx/test/lit.cfg
@@ -67,6 +67,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest):
# Extract test metadata from the test file.
requires = []
unsupported = []
+ use_verify = False
with open(test.getSourcePath()) as f:
for ln in f:
if 'XFAIL:' in ln:
@@ -78,6 +79,8 @@ class LibcxxTestFormat(lit.formats.FileBasedTest):
elif 'UNSUPPORTED:' in ln:
items = ln[ln.index('UNSUPPORTED:') + 12:].split(',')
unsupported.extend([s.strip() for s in items])
+ elif 'USE_VERIFY' in ln and self.use_verify_for_fail:
+ use_verify = True
elif not ln.strip().startswith("//") and ln.strip():
# Stop at the first non-empty line that is not a C++
# comment.
@@ -103,9 +106,9 @@ class LibcxxTestFormat(lit.formats.FileBasedTest):
', '.join(unsupported_features),))
# Evaluate the test.
- return self._evaluate_test(test, lit_config)
+ return self._evaluate_test(test, use_verify, lit_config)
- def _evaluate_test(self, test, lit_config):
+ def _evaluate_test(self, test, use_verify, lit_config):
name = test.path_in_suite[-1]
source_path = test.getSourcePath()
source_dir = os.path.dirname(source_path)
@@ -119,7 +122,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest):
cmd = [self.cxx_under_test, '-c',
'-o', '/dev/null', source_path] + self.cpp_flags
expected_rc = 1
- if self.use_verify_for_fail:
+ if use_verify:
cmd += ['-Xclang', '-verify']
expected_rc = 0
out, err, rc = self.execute_command(cmd)
OpenPOWER on IntegriCloud