]> granicus.if.org Git - llvm/commitdiff
[lit] Don't norm case when inserting into the config map.
authorZachary Turner <zturner@google.com>
Thu, 21 Sep 2017 17:02:08 +0000 (17:02 +0000)
committerZachary Turner <zturner@google.com>
Thu, 21 Sep 2017 17:02:08 +0000 (17:02 +0000)
This makes all paths lowercase on Windows, which seemed like a
good idea at the time, but it means that tests can't properly
use FileCheck to match expected path names.

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

utils/lit/lit/discovery.py
utils/lit/tests/Inputs/config-map-discovery/driver.py
utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg
utils/lit/tests/discovery.py
utils/llvm-lit/llvm-lit.in

index 66c1181017ae9b8bef48b42cfbaeb3dd8fe348d9..aba7453e9d4dbeab559ef7bf099fb83f5d4daeb1 100644 (file)
@@ -54,8 +54,6 @@ def getTestSuite(item, litConfig, cache):
         config_map = litConfig.params.get('config_map')
         if config_map:
             cfgpath = os.path.realpath(cfgpath)
-            cfgpath = os.path.normpath(cfgpath)
-            cfgpath = os.path.normcase(cfgpath)
             target = config_map.get(cfgpath)
             if target:
                 cfgpath = target
index c1acdfc972f2750dcb984bbc320f1c6eba4004ea..b5344e8fb8359f17a58aa7472305682077b403c8 100644 (file)
@@ -4,7 +4,7 @@ import sys
 
 main_config = sys.argv[1]
 
-config_map = {lit.util.norm_path(main_config) : sys.argv[2]}
+config_map = {os.path.realpath(main_config) : sys.argv[2]}
 builtin_parameters = {'config_map' : config_map}
 
 if __name__=='__main__':
index 8462c81bdca40ef7846ef7e25e5cb856e4a82201..c7b303f50a05c85e4d0929a66ff888f7754803aa 100644 (file)
@@ -5,5 +5,5 @@ config.suffixes = ['.txt']
 config.test_format = lit.formats.ShTest()
 
 import os
-config.test_exec_root = lit.util.norm_path(os.path.dirname(__file__))
+config.test_exec_root = os.path.realpath(os.path.dirname(__file__))
 config.test_source_root = os.path.join(config.test_exec_root, "tests")
index 41a2d6cad3d0ec94f4c14eb367113a4f0b2776a4..c6b705c6293bf2503a4e6fc5597263047c0a8903 100644 (file)
@@ -37,7 +37,7 @@
 # CHECK-CONFIG-MAP-OUT: -- Test Suites --
 # CHECK-CONFIG-MAP-OUT:   config-map - 2 tests
 # CHECK-CONFIG-MAP-OUT:     Source Root: {{.*[/\\]config-map-discovery[/\\]tests}}
-# CHECK-CONFIG-MAP-OUT:     Exec Root  : {{.*[/\\]tests[/\\]inputs[/\\]config-map-discovery}}
+# CHECK-CONFIG-MAP-OUT:     Exec Root  : {{.*[/\\]tests[/\\]Inputs[/\\]config-map-discovery}}
 # CHECK-CONFIG-MAP-OUT: -- Available Tests --
 # CHECK-CONFIG-MAP-OUT-NOT: invalid-test.txt
 # CHECK-CONFIG-MAP-OUT:   config-map :: test1.txt
index a12056dcc55941e1a3123278fa5221814efb2389..fd306cced366f8ef50f04c7c2a669eb52081d23d 100755 (executable)
@@ -8,8 +8,6 @@ config_map = {}
 def map_config(source_dir, site_config):
     global config_map
     source_dir = os.path.realpath(source_dir)
-    source_dir = os.path.normpath(source_dir)
-    source_dir = os.path.normcase(source_dir)
     site_config = os.path.normpath(site_config)
     config_map[source_dir] = site_config