[llvm-commits] [llvm] r166305 - in /llvm/trunk/utils: lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg lit/lit/TestRunner.py vim/llvm.vim
Daniel Dunbar
daniel at zuster.org
Fri Oct 19 13:29:27 PDT 2012
Author: ddunbar
Date: Fri Oct 19 15:29:27 2012
New Revision: 166305
URL: http://llvm.org/viewvc/llvm-project?rev=166305&view=rev
Log:
lit: Remove support for XTARGET.
- The XTARGET feature (inherited from old DG tests) was just confusing (and
barely ever used). The same effect can now be achieved with a combination of
the more useful REQUIRES and XFAIL.
Removed:
llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll
Modified:
llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg
llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg
llvm/trunk/utils/lit/lit/TestRunner.py
llvm/trunk/utils/vim/llvm.vim
Removed: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll?rev=166304&view=auto
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll (original)
+++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll (removed)
@@ -1,3 +0,0 @@
-; RUN: true
-; XFAIL: *
-; XTARGET: darwin
Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg?rev=166305&r1=166304&r2=166305&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg (original)
+++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg Fri Oct 19 15:29:27 2012
@@ -77,7 +77,7 @@
excludes = []
-# Provide target_triple for use in XFAIL and XTARGET.
+# Provide target_triple for use in XFAIL.
config.target_triple = site_exp['target_triplet']
# Provide llvm_supports_target for use in local configs.
Modified: llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg?rev=166305&r1=166304&r2=166305&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg (original)
+++ llvm/trunk/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg Fri Oct 19 15:29:27 2012
@@ -77,7 +77,7 @@
excludes = []
-# Provide target_triple for use in XFAIL and XTARGET.
+# Provide target_triple for use in XFAIL.
config.target_triple = site_exp['target_triplet']
# Provide llvm_supports_target for use in local configs.
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=166305&r1=166304&r2=166305&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Fri Oct 19 15:29:27 2012
@@ -370,32 +370,27 @@
return executeCommand(command, cwd=cwd, env=test.config.environment)
-def isExpectedFail(test, xfails, xtargets):
- # If the xfail matches an available feature, it always fails.
+def isExpectedFail(test, xfails):
+ # Check if any of the xfails match an available feature or the target.
for item in xfails:
- if item in test.config.available_features:
+ # If this is the wildcard, it always fails.
+ if item == '*':
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
+ # If this is an exact match for one of the features, it fails.
+ if item in test.config.available_features:
+ return True
- # If so, see if it is expected to pass on this target.
- #
- # FIXME: Rename XTARGET to something that makes sense, like XPASS.
- for item in xtargets:
- if item == '*' or item in test.suite.config.target_triple:
- return False
+ # If this is a part of the target triple, it fails.
+ if item in test.suite.config.target_triple:
+ return True
- return True
+ return False
def parseIntegratedTestScript(test, normalize_slashes=False,
extra_substitutions=[]):
"""parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
- script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET'
+ script and extract the lines to 'RUN' as well as 'XFAIL' and 'REQUIRES'
information. The RUN lines also will have variable substitution performed.
"""
@@ -436,7 +431,6 @@
# Collect the test lines from the script.
script = []
xfails = []
- xtargets = []
requires = []
for ln in open(sourcepath):
if 'RUN:' in ln:
@@ -455,9 +449,6 @@
elif 'XFAIL:' in ln:
items = ln[ln.index('XFAIL:') + 6:].split(',')
xfails.extend([s.strip() for s in items])
- elif 'XTARGET:' in ln:
- items = ln[ln.index('XTARGET:') + 8:].split(',')
- xtargets.extend([s.strip() for s in items])
elif 'REQUIRES:' in ln:
items = ln[ln.index('REQUIRES:') + 9:].split(',')
requires.extend([s.strip() for s in items])
@@ -496,7 +487,7 @@
return (Test.UNSUPPORTED,
"Test requires the following features: %s" % msg)
- isXFail = isExpectedFail(test, xfails, xtargets)
+ isXFail = isExpectedFail(test, xfails)
return script,isXFail,tmpBase,execdir
def formatTestOutput(status, out, err, exitCode, failDueToStderr, script):
Modified: llvm/trunk/utils/vim/llvm.vim
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/vim/llvm.vim?rev=166305&r1=166304&r2=166305&view=diff
==============================================================================
--- llvm/trunk/utils/vim/llvm.vim (original)
+++ llvm/trunk/utils/vim/llvm.vim Fri Oct 19 15:29:27 2012
@@ -79,7 +79,6 @@
syn match llvmSpecialComment /;\s*PR\d*\s*$/
syn match llvmSpecialComment /;\s*END\.\s*$/
syn match llvmSpecialComment /;\s*XFAIL:.*$/
-syn match llvmSpecialComment /;\s*XTARGET:.*$/
if version >= 508 || !exists("did_c_syn_inits")
if version < 508
More information about the llvm-commits
mailing list