[llvm] r313889 - [lit] Don't norm case when inserting into the config map.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 10:02:08 PDT 2017
Author: zturner
Date: Thu Sep 21 10:02:08 2017
New Revision: 313889
URL: http://llvm.org/viewvc/llvm-project?rev=313889&view=rev
Log:
[lit] Don't norm case when inserting into the config map.
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.
Modified:
llvm/trunk/utils/lit/lit/discovery.py
llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/driver.py
llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg
llvm/trunk/utils/lit/tests/discovery.py
llvm/trunk/utils/llvm-lit/llvm-lit.in
Modified: llvm/trunk/utils/lit/lit/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=313889&r1=313888&r2=313889&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/discovery.py (original)
+++ llvm/trunk/utils/lit/lit/discovery.py Thu Sep 21 10:02:08 2017
@@ -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
Modified: llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/driver.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/driver.py?rev=313889&r1=313888&r2=313889&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/driver.py (original)
+++ llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/driver.py Thu Sep 21 10:02:08 2017
@@ -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__':
Modified: llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg?rev=313889&r1=313888&r2=313889&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg (original)
+++ llvm/trunk/utils/lit/tests/Inputs/config-map-discovery/lit.alt.cfg Thu Sep 21 10:02:08 2017
@@ -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")
Modified: llvm/trunk/utils/lit/tests/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/discovery.py?rev=313889&r1=313888&r2=313889&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/discovery.py (original)
+++ llvm/trunk/utils/lit/tests/discovery.py Thu Sep 21 10:02:08 2017
@@ -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
Modified: llvm/trunk/utils/llvm-lit/llvm-lit.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/llvm-lit.in?rev=313889&r1=313888&r2=313889&view=diff
==============================================================================
--- llvm/trunk/utils/llvm-lit/llvm-lit.in (original)
+++ llvm/trunk/utils/llvm-lit/llvm-lit.in Thu Sep 21 10:02:08 2017
@@ -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
More information about the llvm-commits
mailing list