Revert r97726 and r97728 at ddunbar's request; we want to solve this
authorJohn McCall <rjmccall@apple.com>
Mon, 8 Mar 2010 20:02:05 +0000 (20:02 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 8 Mar 2010 20:02:05 +0000 (20:02 +0000)
some other way when it comes to be necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97972 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg
utils/lit/lit/TestRunner.py
utils/lit/lit/TestingConfig.py

index b4aec5a50ab145b9d51bcddc9330992096c5c64d..929871a1d225d53395a3584959d965e65e2c7143 100644 (file)
@@ -144,9 +144,6 @@ bindings = set(site_exp['llvm_bindings'].split(','))
 def llvm_supports_binding(name):
     return name in bindings
 
-config.conditions["TARGET"] = llvm_supports_target
-config.conditions["BINDING"] = llvm_supports_binding
-
 # Provide on_clone hook for reading 'dg.exp'.
 import os
 simpleLibData = re.compile(r"""load_lib llvm.exp
index a7de2b79f8f371c8f827c2d2e8dbda83683ee29d..20fbc6c13a9f24f4b0754abbbcd1991089346064 100644 (file)
@@ -353,8 +353,6 @@ def isExpectedFail(xfails, xtargets, target_triple):
 
     return True
 
-import re
-
 def parseIntegratedTestScript(test):
     """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test
     script and extract the lines to 'RUN' as well as 'XFAIL' and 'XTARGET'
@@ -387,21 +385,7 @@ def parseIntegratedTestScript(test):
     script = []
     xfails = []
     xtargets = []
-    ignoredAny = False
     for ln in open(sourcepath):
-        conditional = re.search('IF\((.+?)\((.+?)\)\):', ln)
-        if conditional:
-            ln = ln[conditional.end():]
-            condition = conditional.group(1)
-            value = conditional.group(2)
-
-            # Actually test the condition.
-            if condition not in test.config.conditions:
-                return (Test.UNRESOLVED, "unknown condition '"+condition+"'")
-            if not test.config.conditions[condition](value):
-                ignoredAny = True
-                continue
-
         if 'RUN:' in ln:
             # Isolate the command to run.
             index = ln.index('RUN:')
@@ -438,8 +422,6 @@ def parseIntegratedTestScript(test):
 
     # Verify the script contains a run line.
     if not script:
-        if ignoredAny:
-            return (Test.UNSUPPORTED, "Test has only ignored run lines")
         return (Test.UNRESOLVED, "Test has no run line!")
 
     if script[-1][-1] == '\\':
index d6f2a4dc7111a473de8dcf601a98fc6fa65518c4..dd905ef3ee10f623908eaa685995a263a09f6a53 100644 (file)
@@ -28,8 +28,7 @@ class TestingConfig:
                                    on_clone = None,
                                    test_exec_root = None,
                                    test_source_root = None,
-                                   excludes = [],
-                                   conditions = {})
+                                   excludes = [])
 
         if os.path.exists(path):
             # FIXME: Improve detection and error reporting of errors in the
@@ -55,7 +54,7 @@ class TestingConfig:
 
     def __init__(self, parent, name, suffixes, test_format,
                  environment, substitutions, unsupported, on_clone,
-                 test_exec_root, test_source_root, excludes, conditions):
+                 test_exec_root, test_source_root, excludes):
         self.parent = parent
         self.name = str(name)
         self.suffixes = set(suffixes)
@@ -67,7 +66,6 @@ class TestingConfig:
         self.test_exec_root = test_exec_root
         self.test_source_root = test_source_root
         self.excludes = set(excludes)
-        self.conditions = dict(conditions)
 
     def clone(self, path):
         # FIXME: Chain implementations?
@@ -77,7 +75,7 @@ class TestingConfig:
                             self.environment, self.substitutions,
                             self.unsupported, self.on_clone,
                             self.test_exec_root, self.test_source_root,
-                            self.excludes, self.conditions)
+                            self.excludes)
         if cfg.on_clone:
             cfg.on_clone(self, cfg, path)
         return cfg