summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-02-24 12:34:34 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-02-24 12:34:34 +0000
commitcb1b5ff9c643777cbfc51852860804293c9a0006 (patch)
treeb0ef855f51b474e9c91fc184ee6cc3dbb531449e
parent47481b97542368c2e9158f4eb786572fdc96b73f (diff)
downloadbcm5719-llvm-cb1b5ff9c643777cbfc51852860804293c9a0006.tar.gz
bcm5719-llvm-cb1b5ff9c643777cbfc51852860804293c9a0006.zip
test/lit.cfg: Add PATHEXT to 'substitution', to recognize tools on Windows hosts. Thanks to Danil Malyshev!
Some tests on Windows use the "not" utility and fail with an error "program not executable". The reason for this error is that the name of the executable file sended to the "not" without the extension. llvm-svn: 126383
-rw-r--r--llvm/test/lit.cfg9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index 9a4cfa4d388..9a2f74c21c9 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -175,6 +175,10 @@ for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
# (llvm_tools_dir in lit parlance).
# Don't match 'bugpoint-' or 'clang-'.
# Don't match '/clang'.
+if os.pathsep == ';':
+ pathext = os.environ.get('PATHEXT', '').split(';')
+else:
+ pathext = ['']
for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/)\bclang\b(?!-)",
r"\bgold\b",
r"\bllc\b", r"\blli\b",
@@ -204,6 +208,11 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/)\bclang\b(?!-)",
substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
r"\2" + llvm_tools_dir + "/" + r"\4",
pattern)
+ for ext in pathext:
+ substitution_ext = substitution + ext
+ if os.path.exists(substitution_ext):
+ substitution = substitution_ext
+ break
config.substitutions.append((pattern, substitution))
excludes = []
OpenPOWER on IntegriCloud