[llvm] r319329 - Make check-lit tests respect LLVM_LIT_TOOLS_DIR
Greg Bedwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 10:05:26 PST 2017
Author: gbedwell
Date: Wed Nov 29 10:05:26 2017
New Revision: 319329
URL: http://llvm.org/viewvc/llvm-project?rev=319329&view=rev
Log:
Make check-lit tests respect LLVM_LIT_TOOLS_DIR
Differential Revision: https://reviews.llvm.org/D40520
Modified:
llvm/trunk/utils/lit/tests/lit.cfg
llvm/trunk/utils/lit/tests/lit.site.cfg.in
llvm/trunk/utils/lit/tests/shtest-format.py
Modified: llvm/trunk/utils/lit/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/lit.cfg?rev=319329&r1=319328&r2=319329&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/lit.cfg (original)
+++ llvm/trunk/utils/lit/tests/lit.cfg Wed Nov 29 10:05:26 2017
@@ -64,7 +64,10 @@ except ImportError:
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
Modified: llvm/trunk/utils/lit/tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/lit.site.cfg.in?rev=319329&r1=319328&r2=319329&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/lit.site.cfg.in (original)
+++ llvm/trunk/utils/lit/tests/lit.site.cfg.in Wed Nov 29 10:05:26 2017
@@ -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@"
Modified: llvm/trunk/utils/lit/tests/shtest-format.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/shtest-format.py?rev=319329&r1=319328&r2=319329&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/shtest-format.py (original)
+++ llvm/trunk/utils/lit/tests/shtest-format.py Wed Nov 29 10:05:26 2017
@@ -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
More information about the llvm-commits
mailing list