summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2018-06-22 09:46:40 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2018-06-22 09:46:40 +0000
commit9b10b69afa8d0fca61bb2eb9959b65825983c6ac (patch)
treeef1f5d11bd136f811acfed57345b75082063762e /clang
parent9c8f9374b5ae3f087836445dce46e22c238891c0 (diff)
downloadbcm5719-llvm-9b10b69afa8d0fca61bb2eb9959b65825983c6ac.tar.gz
bcm5719-llvm-9b10b69afa8d0fca61bb2eb9959b65825983c6ac.zip
[hmaptool] Turn %hmaptool into a proper substitution
This is still super ugly, but at least it doesn't require working directories to just line up perfectly for python to find the tool. llvm-svn: 335330
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Modules/crash-vfs-headermaps.m2
-rw-r--r--clang/test/Preprocessor/headermap-rel.c2
-rw-r--r--clang/test/Preprocessor/headermap-rel2.c2
-rw-r--r--clang/test/Preprocessor/nonportable-include-with-hmap.c2
-rw-r--r--clang/test/lit.cfg.py6
5 files changed, 9 insertions, 5 deletions
diff --git a/clang/test/Modules/crash-vfs-headermaps.m b/clang/test/Modules/crash-vfs-headermaps.m
index c340d268ea9..118537ba2a4 100644
--- a/clang/test/Modules/crash-vfs-headermaps.m
+++ b/clang/test/Modules/crash-vfs-headermaps.m
@@ -3,7 +3,7 @@
// RUN: rm -rf %t
// RUN: mkdir -p %t/m %t/i/Foo.framework/Headers
// RUN: echo '// Foo.h' > %t/i/Foo.framework/Headers/Foo.h
-// RUN: '%python' hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
+// RUN: %hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
diff --git a/clang/test/Preprocessor/headermap-rel.c b/clang/test/Preprocessor/headermap-rel.c
index 4c67186830f..db57534c1c7 100644
--- a/clang/test/Preprocessor/headermap-rel.c
+++ b/clang/test/Preprocessor/headermap-rel.c
@@ -1,5 +1,5 @@
// RUN: rm -f %t.hmap
-// RUN: '%python' hmaptool write %S/Inputs/headermap-rel/foo.hmap.json %t.hmap
+// RUN: %hmaptool write %S/Inputs/headermap-rel/foo.hmap.json %t.hmap
// RUN: %clang_cc1 -E %s -o %t.i -I %t.hmap -F %S/Inputs/headermap-rel
// RUN: FileCheck %s -input-file %t.i
diff --git a/clang/test/Preprocessor/headermap-rel2.c b/clang/test/Preprocessor/headermap-rel2.c
index af12bf3949b..83e89f0a492 100644
--- a/clang/test/Preprocessor/headermap-rel2.c
+++ b/clang/test/Preprocessor/headermap-rel2.c
@@ -1,5 +1,5 @@
// RUN: rm -f %t.hmap
-// RUN: '%python' hmaptool write %S/Inputs/headermap-rel2/project-headers.hmap.json %t.hmap
+// RUN: %hmaptool write %S/Inputs/headermap-rel2/project-headers.hmap.json %t.hmap
// RUN: %clang_cc1 -v -fsyntax-only %s -iquote %t.hmap -isystem %S/Inputs/headermap-rel2/system/usr/include -I %S/Inputs/headermap-rel2 -H
// RUN: %clang_cc1 -fsyntax-only %s -iquote %t.hmap -isystem %S/Inputs/headermap-rel2/system/usr/include -I %S/Inputs/headermap-rel2 -H 2> %t.out
// RUN: FileCheck %s -input-file %t.out
diff --git a/clang/test/Preprocessor/nonportable-include-with-hmap.c b/clang/test/Preprocessor/nonportable-include-with-hmap.c
index f2c279f36ce..bbbd669a0f3 100644
--- a/clang/test/Preprocessor/nonportable-include-with-hmap.c
+++ b/clang/test/Preprocessor/nonportable-include-with-hmap.c
@@ -1,5 +1,5 @@
// RUN: rm -f %t.hmap
-// RUN: '%python' hmaptool write %S/Inputs/nonportable-hmaps/foo.hmap.json %t.hmap
+// RUN: %hmaptool write %S/Inputs/nonportable-hmaps/foo.hmap.json %t.hmap
// RUN: %clang_cc1 -Eonly \
// RUN: -I%t.hmap \
// RUN: -I%S/Inputs/nonportable-hmaps \
diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index 6fa7ef66fc9..5b11691f447 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -58,7 +58,7 @@ tool_dirs = [config.clang_tools_dir, config.llvm_tools_dir]
tools = [
'c-index-test', 'clang-check', 'clang-diff', 'clang-format', 'clang-tblgen',
- 'opt', 'hmaptool',
+ 'opt',
ToolSubst('%clang_func_map', command=FindTool(
'clang-func-mapping'), unresolved='ignore'),
]
@@ -69,6 +69,10 @@ if config.clang_examples:
llvm_config.add_tool_substitutions(tools, tool_dirs)
+config.substitutions.append(
+ ('%hmaptool', '%s %s' % (config.python_executable,
+ os.path.join(config.llvm_tools_dir, 'hmaptool'))))
+
# Plugins (loadable modules)
# TODO: This should be supplied by Makefile or autoconf.
if sys.platform in ['win32', 'cygwin']:
OpenPOWER on IntegriCloud