[clang] 2718ae3 - [clang][deps] Substitute clang-scan-deps executable in lit tests

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 4 04:55:18 PDT 2021


Author: Jan Svoboda
Date: 2021-08-04T13:55:14+02:00
New Revision: 2718ae397b29f339e65c1e3ca5e834b648732d20

URL: https://github.com/llvm/llvm-project/commit/2718ae397b29f339e65c1e3ca5e834b648732d20
DIFF: https://github.com/llvm/llvm-project/commit/2718ae397b29f339e65c1e3ca5e834b648732d20.diff

LOG: [clang][deps] Substitute clang-scan-deps executable in lit tests

The lit tests for `clang-scan-deps` invoke the tool without going through the substitution system. While the test runner correctly picks up the `clang-scan-deps` binary from the build directory, it doesn't print its absolute path. When copying the invocations when reproducing test failures, this can result in `command not found: clang-scan-deps` errors or worse yet: pick up the system `clang-scan-deps`. This patch adds new local `%clang-scan-deps` substitution.

Reviewed By: lxfind, dblaikie

Differential Revision: https://reviews.llvm.org/D107155

Added: 
    

Modified: 
    clang/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index c872b6aab847..3a820943bd0f 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -64,7 +64,7 @@
 
 tools = [
     'apinotes-test', 'c-index-test', 'clang-
diff ', 'clang-format', 'clang-repl',
-    'clang-tblgen', 'opt', 'llvm-ifs', 'yaml2obj',
+    'clang-tblgen', 'clang-scan-deps', 'opt', 'llvm-ifs', 'yaml2obj',
     ToolSubst('%clang_extdef_map', command=FindTool(
         'clang-extdef-mapping'), unresolved='ignore'),
 ]


        


More information about the cfe-commits mailing list