[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)
Henrik G. Olsson via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 13:39:30 PDT 2024
================
@@ -2,3 +2,15 @@ config.substitutions = list(config.substitutions)
config.substitutions.insert(
0, (r"%clang\b", """*** Do not use the driver in Sema tests. ***""")
)
+
+if lit_config.update_tests:
+ import sys
+ import os
+
+ curdir = os.path.dirname(os.path.realpath(__file__))
+ testdir = os.path.dirname(curdir)
+ clangdir = os.path.dirname(testdir)
+ utilspath = os.path.join(clangdir, "utils")
----------------
hnrklssn wrote:
Ah neat, wasn't aware that was a thing
https://github.com/llvm/llvm-project/pull/108425
More information about the cfe-commits
mailing list