mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Simplify the condition-checking logic and hopefully clear up a build failure
that somehow got through my testing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b7b90769a
commit
b8f2e4bde6
@ -353,6 +353,8 @@ def isExpectedFail(xfails, xtargets, target_triple):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
def parseIntegratedTestScript(test):
|
def parseIntegratedTestScript(test):
|
||||||
"""parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
|
"""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 'XTARGET'
|
||||||
@ -387,20 +389,11 @@ def parseIntegratedTestScript(test):
|
|||||||
xtargets = []
|
xtargets = []
|
||||||
ignoredAny = False
|
ignoredAny = False
|
||||||
for ln in open(sourcepath):
|
for ln in open(sourcepath):
|
||||||
if 'IF(' in ln:
|
conditional = re.search('IF\((.+?)\((.+?)\)\):', ln)
|
||||||
# Required syntax here is IF(condition(value)):
|
if conditional:
|
||||||
index = ln.index('IF(')
|
ln = ln[conditional.end():]
|
||||||
ln = ln[index+3:]
|
condition = conditional.group(1)
|
||||||
index = ln.index('(')
|
value = conditional.group(2)
|
||||||
if index is -1:
|
|
||||||
return (Test.UNRESOLVED, "ill-formed IF at '"+ln[:10]+"'")
|
|
||||||
condition = ln[:index]
|
|
||||||
ln = ln[index+1:]
|
|
||||||
index = ln.index(')')
|
|
||||||
if index is -1 or ln[index:index+3] != ')):':
|
|
||||||
return (Test.UNRESOLVED, "ill-formed IF at '"+ln[:10]+"'")
|
|
||||||
value = ln[:index]
|
|
||||||
ln = ln[index+3:]
|
|
||||||
|
|
||||||
# Actually test the condition.
|
# Actually test the condition.
|
||||||
if condition not in test.config.conditions:
|
if condition not in test.config.conditions:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user