localConfig)
class ShTest(FileBasedTest):
localConfig)
class ShTest(FileBasedTest):
- def __init__(self, execute_external = False, require_and_and = False):
+ def __init__(self, execute_external = False):
self.execute_external = execute_external
self.execute_external = execute_external
- self.require_and_and = require_and_and
def execute(self, test, litConfig):
return TestRunner.executeShTest(test, litConfig,
def execute(self, test, litConfig):
return TestRunner.executeShTest(test, litConfig,
- self.execute_external,
- self.require_and_and)
class TclTest(FileBasedTest):
def execute(self, test, litConfig):
class TclTest(FileBasedTest):
def execute(self, test, litConfig):
-def parseIntegratedTestScript(test, requireAndAnd):
+def parseIntegratedTestScript(test):
"""parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET'
information. The RUN lines also will have variable substitution performed.
"""parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET'
information. The RUN lines also will have variable substitution performed.
if script[-1][-1] == '\\':
return (Test.UNRESOLVED, "Test has unterminated run lines (with '\\')")
if script[-1][-1] == '\\':
return (Test.UNRESOLVED, "Test has unterminated run lines (with '\\')")
- # Validate interior lines for '&&', a lovely historical artifact.
- if requireAndAnd:
- for i in range(len(script) - 1):
- ln = script[i]
-
- if not ln.endswith('&&'):
- return (Test.FAIL,
- ("MISSING \'&&\': %s\n" +
- "FOLLOWED BY : %s\n") % (ln, script[i + 1]))
-
- # Strip off '&&'
- script[i] = ln[:-2]
-
isXFail = isExpectedFail(xfails, xtargets, test.suite.config.target_triple)
return script,isXFail,tmpBase,execdir
isXFail = isExpectedFail(xfails, xtargets, test.suite.config.target_triple)
return script,isXFail,tmpBase,execdir
if test.config.unsupported:
return (Test.UNSUPPORTED, 'Test is unsupported')
if test.config.unsupported:
return (Test.UNSUPPORTED, 'Test is unsupported')
- res = parseIntegratedTestScript(test, False)
+ res = parseIntegratedTestScript(test)
if len(res) == 2:
return res
if len(res) == 2:
return res
return formatTestOutput(status, out, err, exitCode, script)
return formatTestOutput(status, out, err, exitCode, script)
-def executeShTest(test, litConfig, useExternalSh, requireAndAnd):
+def executeShTest(test, litConfig, useExternalSh):
if test.config.unsupported:
return (Test.UNSUPPORTED, 'Test is unsupported')
if test.config.unsupported:
return (Test.UNSUPPORTED, 'Test is unsupported')
- res = parseIntegratedTestScript(test, requireAndAnd)
+ res = parseIntegratedTestScript(test)
if len(res) == 2:
return res
if len(res) == 2:
return res