]> granicus.if.org Git - clang/commitdiff
test: CMake: Be aware of LLVM_LIT_TOOLS_DIR.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 9 Feb 2011 04:19:57 +0000 (04:19 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 9 Feb 2011 04:19:57 +0000 (04:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125178 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg
test/lit.site.cfg.in

index 5dec8ff477b55a0547e6d743bc3cac5666c1be7c..13986a069b9f648a9fc6e9fff9c1641e0c027ce7 100644 (file)
@@ -8,6 +8,18 @@ import platform
 # name: The name of this test suite.
 config.name = 'Clang'
 
+# Tweak PATH for Win32
+if platform.system() == 'Windows':
+    # Seek sane tools in directories and set to $PATH.
+    path = getattr(config, 'lit_tools_dir', None)
+    path = lit.getToolsPath(path,
+                            config.environment['PATH'],
+                            ['cmp.exe', 'grep.exe', 'sed.exe'])
+    if path is not None:
+        path = os.path.pathsep.join((path,
+                                     config.environment['PATH']))
+        config.environment['PATH'] = path
+
 # testFormat: The test format to use to interpret tests.
 #
 # For now we require '&&' between commands, until they get globally killed and
index 0d452ef6b55aa6443aa110af150d2222e4a82cd9..df90b81055f8b6635f8b3a478bcf7a5443cf30f8 100644 (file)
@@ -4,6 +4,7 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.clang_obj_root = "@CLANG_BINARY_DIR@"
 config.target_triple = "@TARGET_TRIPLE@"