[update_cc_test_checks.py] Add test for D84511
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 6 Aug 2020 07:25:10 +0000 (08:25 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 6 Aug 2020 08:15:56 +0000 (09:15 +0100)
Reviewed By: MaskRay

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

clang/test/utils/update_cc_test_checks/basic-cplusplus.test
clang/test/utils/update_cc_test_checks/lit.local.cfg

index 10be017..3557e18 100644 (file)
@@ -2,6 +2,9 @@
 
 # RUN: cp %S/Inputs/basic-cplusplus.cpp %t.cpp && %update_cc_test_checks %t.cpp
 # RUN: diff -u %S/Inputs/basic-cplusplus.cpp.expected %t.cpp
+## Check that it also works with the --llvm-bin flag instead of --clang
+# RUN: cp %S/Inputs/basic-cplusplus.cpp %t.cpp && %update_cc_test_checks --clang='' --llvm-bin=%clang_tools_dir %t.cpp
+# RUN: diff -u %S/Inputs/basic-cplusplus.cpp.expected %t.cpp
 ## Check that re-running update_cc_test_checks doesn't change the output
 # RUN: %update_cc_test_checks %t.cpp
 # RUN: diff -u %S/Inputs/basic-cplusplus.cpp.expected %t.cpp
index 0250446..3fef028 100644 (file)
@@ -23,3 +23,5 @@ config.substitutions.append(
     ('%update_cc_test_checks', "%s %s %s" % (
         shell_quote(config.python_executable), shell_quote(script_path),
         extra_args)))
+config.substitutions.append(
+    ('%clang_tools_dir', shell_quote(config.clang_tools_dir)))