Index: llvm/trunk/utils/lit/tests/lit.cfg =================================================================== --- llvm/trunk/utils/lit/tests/lit.cfg +++ llvm/trunk/utils/lit/tests/lit.cfg @@ -64,7 +64,10 @@ if sys.platform.startswith('win') or sys.platform.startswith('cygwin'): config.available_features.add('windows') -# Add llvm tools directory if this config is being loaded indirectly -if getattr(config, 'llvm_tools_dir', None) is not None: - path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH'])) - config.environment['PATH'] = path +# Add llvm and lit tools directories if this config is being loaded indirectly. +path = config.environment['PATH'] +for attribute in ('llvm_tools_dir', 'lit_tools_dir'): + directory = getattr(config, attribute, None) + if directory: + path = os.path.pathsep.join((directory, path)) +config.environment['PATH'] = path Index: llvm/trunk/utils/lit/tests/lit.site.cfg.in =================================================================== --- llvm/trunk/utils/lit/tests/lit.site.cfg.in +++ llvm/trunk/utils/lit/tests/lit.site.cfg.in @@ -2,6 +2,7 @@ import sys +config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.llvm_src_root = "@LLVM_SOURCE_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" Index: llvm/trunk/utils/lit/tests/shtest-format.py =================================================================== --- llvm/trunk/utils/lit/tests/shtest-format.py +++ llvm/trunk/utils/lit/tests/shtest-format.py @@ -16,7 +16,7 @@ # CHECK-NEXT: line 2: failed test output on stdout # CHECK: Command Output (stderr): # CHECK-NEXT: -- -# CHECK-NEXT: cat: does-not-exist: No such file or directory +# CHECK-NEXT: cat{{(\.exe)?}}: does-not-exist: No such file or directory # CHECK: -- # CHECK: FAIL: shtest-format :: external_shell/fail_with_bad_encoding.txt