diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-10-18 20:43:04 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-10-18 20:43:04 +0000 |
commit | f1706edf5dc2d290c94f6750b7264d4218d612f9 (patch) | |
tree | 0a3b09c5f5e7b8817da280dfd244fe32bff6cc61 /llvm/utils/lit | |
parent | 842227a2e28f6e522f10955802a00523af158606 (diff) | |
download | bcm5719-llvm-f1706edf5dc2d290c94f6750b7264d4218d612f9.tar.gz bcm5719-llvm-f1706edf5dc2d290c94f6750b7264d4218d612f9.zip |
lit: Allow XFAIL: lines to also refer to "features".
llvm-svn: 166224
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/ExampleTests/xfail-feature.c | 4 | ||||
-rw-r--r-- | llvm/utils/lit/lit/TestRunner.py | 15 |
2 files changed, 14 insertions, 5 deletions
diff --git a/llvm/utils/lit/lit/ExampleTests/xfail-feature.c b/llvm/utils/lit/lit/ExampleTests/xfail-feature.c new file mode 100644 index 00000000000..3444bf87008 --- /dev/null +++ b/llvm/utils/lit/lit/ExampleTests/xfail-feature.c @@ -0,0 +1,4 @@ +// This test should XPASS. + +// RUN: true +// XFAIL: some-feature-name diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index 71882b76f8b..62a795671e1 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -370,10 +370,15 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): return executeCommand(command, cwd=cwd, env=test.config.environment) -def isExpectedFail(xfails, xtargets, target_triple): - # Check if any xfail matches this target. +def isExpectedFail(test, xfails, xtargets): + # If the xfail matches an available feature, it always fails. for item in xfails: - if item == '*' or item in target_triple: + if item in test.config.available_features: + return True + + # Otherwise, check if any xfail matches this target. + for item in xfails: + if item == '*' or item in test.suite.config.target_triple: break else: return False @@ -382,7 +387,7 @@ def isExpectedFail(xfails, xtargets, target_triple): # # FIXME: Rename XTARGET to something that makes sense, like XPASS. for item in xtargets: - if item == '*' or item in target_triple: + if item == '*' or item in test.suite.config.target_triple: return False return True @@ -491,7 +496,7 @@ def parseIntegratedTestScript(test, normalize_slashes=False, return (Test.UNSUPPORTED, "Test requires the following features: %s" % msg) - isXFail = isExpectedFail(xfails, xtargets, test.suite.config.target_triple) + isXFail = isExpectedFail(test, xfails, xtargets) return script,isXFail,tmpBase,execdir def formatTestOutput(status, out, err, exitCode, failDueToStderr, script): |