[PATCH] D51511: lit: Use sys.executable for executing builtin commands

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 14:47:29 PDT 2018


tstellar created this revision.
tstellar added reviewers: ddunbar, stella.stamenova.
Herald added a subscriber: delcypher.

The python executable may not exist on all systems so use sys.executable
instead.


Repository:
  rL LLVM

https://reviews.llvm.org/D51511

Files:
  utils/lit/lit/TestRunner.py


Index: utils/lit/lit/TestRunner.py
===================================================================
--- utils/lit/lit/TestRunner.py
+++ utils/lit/lit/TestRunner.py
@@ -879,7 +879,7 @@
         # Expand all glob expressions
         args = expand_glob_expressions(args, cmd_shenv.cwd)
         if is_builtin_cmd:
-            args.insert(0, "python")
+            args.insert(0, sys.executable)
             args[1] = os.path.join(builtin_commands_dir ,args[1] + ".py")
 
         # On Windows, do our own command line quoting for better compatibility


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51511.163418.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180830/299e3f39/attachment.bin>


More information about the llvm-commits mailing list