[PATCH] D108085: Use installed llvm-lit.py instead of lit.py PR-51072

Yaron Keren via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 15 11:51:01 PDT 2021


yaron.keren updated this revision to Diff 366515.
yaron.keren added a comment.

Support both Windows llvm-lit.py and Linux llvm-lit command name


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108085/new/

https://reviews.llvm.org/D108085

Files:
  clang/test/utils/update_cc_test_checks/lit.local.cfg


Index: clang/test/utils/update_cc_test_checks/lit.local.cfg
===================================================================
--- clang/test/utils/update_cc_test_checks/lit.local.cfg
+++ clang/test/utils/update_cc_test_checks/lit.local.cfg
@@ -1,4 +1,5 @@
 import os
+import glob
 
 import lit.util
 
@@ -19,7 +20,9 @@
 script_path = os.path.join(config.llvm_src_root, 'utils',
                            'update_cc_test_checks.py')
 assert os.path.isfile(script_path)
-lit = config.llvm_external_lit if config.llvm_external_lit else shell_quote(os.path.join(config.llvm_src_root, 'utils', 'lit', 'lit.py'))
+# Windows: llvm-lit.py, Linux: llvm-lit
+llvm_lit = glob.glob(os.path.join(config.llvm_tools_dir, 'llvm-lit*'))[0]
+lit = config.llvm_external_lit if config.llvm_external_lit else shell_quote(llvm_lit)
 python = shell_quote(config.python_executable)
 config.substitutions.append(
     ('%update_cc_test_checks', "%s %s %s" % (


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108085.366515.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210815/4b515bcf/attachment.bin>


More information about the cfe-commits mailing list