Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: test/lit.cfg

Issue 887223008: Rebased localmods in clang to 223109. (Closed)
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/Driver/nacl-direct.c ('k') | tools/driver/cc1as_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/lit.cfg
diff --git a/test/lit.cfg b/test/lit.cfg
index 4567f179f8167f0229e5a38ba49bf6f8a7b6a280..1ce1221899c8b62a6e25418872a5df7d8af4a9e3 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -14,6 +14,16 @@ import lit.util
# name: The name of this test suite.
config.name = 'Clang'
+# @LOCALMOD-START
+# Msys tools like make and bash output paths like /c/dir/path. We need Windows
+# drive letters. Makefile.rules has $(ECHOPATH) to try to get Windows paths but
+# it doesn't work with autoconf substitutions like @FOO@=$(path)
+def FixMsysPath(path):
+ if sys.platform == 'win32' and path and path.startswith('/'):
+ return path[1] + ':' + path[2:]
+ return path
+# @LOCALMOD-END
+
# Tweak PATH for Win32
if platform.system() == 'Windows':
# Seek sane tools in directories and set to $PATH.
@@ -55,7 +65,7 @@ config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']
config.test_source_root = os.path.dirname(__file__)
# test_exec_root: The root path where tests should be run.
-clang_obj_root = getattr(config, 'clang_obj_root', None)
+clang_obj_root = FixMsysPath(getattr(config, 'clang_obj_root', None))# @LOCALMOD
if clang_obj_root is not None:
config.test_exec_root = os.path.join(clang_obj_root, 'test')
@@ -93,10 +103,10 @@ for name in possibly_dangerous_env_vars:
# Tweak the PATH to include the tools dir and the scripts dir.
if clang_obj_root is not None:
- clang_tools_dir = getattr(config, 'clang_tools_dir', None)
+ clang_tools_dir = FixMsysPath(getattr(config, 'clang_tools_dir', None)) # @LOCALMOD
if not clang_tools_dir:
lit_config.fatal('No Clang tools dir set!')
- llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+ llvm_tools_dir = FixMsysPath(getattr(config, 'llvm_tools_dir', None)) # @LOCALMOD
if not llvm_tools_dir:
lit_config.fatal('No LLVM tools dir set!')
path = os.path.pathsep.join((
« no previous file with comments | « test/Driver/nacl-direct.c ('k') | tools/driver/cc1as_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698