From: Daniel Dunbar Date: Sun, 8 Nov 2009 09:07:13 +0000 (+0000) Subject: lit: Drop require_and_and support. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ee504b8cd78f5d54e4ae6ed2cfff88a9e8226771;p=oota-llvm.git lit: Drop require_and_and support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86447 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/lit/TestFormats.py b/utils/lit/TestFormats.py index fcafe3cc7ae..d7454e6de34 100644 --- a/utils/lit/TestFormats.py +++ b/utils/lit/TestFormats.py @@ -81,14 +81,12 @@ class FileBasedTest(object): 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.require_and_and = require_and_and def execute(self, test, litConfig): return TestRunner.executeShTest(test, litConfig, - self.execute_external, - self.require_and_and) + self.execute_external) class TclTest(FileBasedTest): def execute(self, test, litConfig): diff --git a/utils/lit/TestRunner.py b/utils/lit/TestRunner.py index 7abc60a1f00..003bcc8e306 100644 --- a/utils/lit/TestRunner.py +++ b/utils/lit/TestRunner.py @@ -353,7 +353,7 @@ def isExpectedFail(xfails, xtargets, target_triple): return True -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. @@ -425,19 +425,6 @@ def parseIntegratedTestScript(test, requireAndAnd): 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 @@ -462,7 +449,7 @@ def executeTclTest(test, litConfig): if test.config.unsupported: return (Test.UNSUPPORTED, 'Test is unsupported') - res = parseIntegratedTestScript(test, False) + res = parseIntegratedTestScript(test) if len(res) == 2: return res @@ -491,11 +478,11 @@ def executeTclTest(test, litConfig): 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') - res = parseIntegratedTestScript(test, requireAndAnd) + res = parseIntegratedTestScript(test) if len(res) == 2: return res