lit: Drop require_and_and support.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 8 Nov 2009 09:07:13 +0000 (09:07 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 8 Nov 2009 09:07:13 +0000 (09:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86447 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/TestFormats.py
utils/lit/TestRunner.py

index fcafe3cc7ae71a1aa48ea0ac70b851abd06d2d9f..d7454e6de34cb161866b4a073408ae231157d52d 100644 (file)
@@ -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):
index 7abc60a1f0045b0ba379ccd4576057858b62d0fd..003bcc8e3066fa4b29e6622ccadd1ec2acc727a4 100644 (file)
@@ -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