[PATCH] D15160: [LIT] Add the –run-under parameter to lit, which lit.cfg will then use.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 12:04:20 PST 2015


mcrosier created this revision.
mcrosier added reviewers: kristof.beyls, MatzeB, rnk, cmatthews, ddunbar.
mcrosier added a subscriber: llvm-commits.

This functionality already exists within the make infrastructure in the form of several environment variables, but does not exist in the cmake infrastructure at present.


http://reviews.llvm.org/D15160

Files:
  utils/lit/lit/LitConfig.py
  utils/lit/lit/main.py

Index: utils/lit/lit/main.py
===================================================================
--- utils/lit/lit/main.py
+++ utils/lit/lit/main.py
@@ -205,6 +205,9 @@
     group.add_option("", "--xunit-xml-output", dest="xunit_output_file",
                       help=("Write XUnit-compatible XML test reports to the"
                             " specified file"), default=None)
+    group.add_option("", "--run-under", dest="run_under", help=("Wrap test"
+                     " execution within specified command"),
+                    default=None)
     parser.add_option_group(group)
 
     group = OptionGroup(parser, "Test Selection")
@@ -284,6 +287,7 @@
         valgrindLeakCheck = opts.valgrindLeakCheck,
         valgrindArgs = opts.valgrindArgs,
         noExecute = opts.noExecute,
+        runUnder = opts.run_under,
         debug = opts.debug,
         isWindows = isWindows,
         params = userParams,
Index: utils/lit/lit/LitConfig.py
===================================================================
--- utils/lit/lit/LitConfig.py
+++ utils/lit/lit/LitConfig.py
@@ -20,7 +20,7 @@
 
     def __init__(self, progname, path, quiet,
                  useValgrind, valgrindLeakCheck, valgrindArgs,
-                 noExecute, debug, isWindows,
+                 noExecute, runUnder, debug, isWindows,
                  params, config_prefix = None):
         # The name of the test runner.
         self.progname = progname
@@ -31,6 +31,7 @@
         self.valgrindLeakCheck = bool(valgrindLeakCheck)
         self.valgrindUserArgs = list(valgrindArgs)
         self.noExecute = noExecute
+        self.runUnder = runUnder
         self.debug = debug
         self.isWindows = bool(isWindows)
         self.params = dict(params)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15160.41658.patch
Type: text/x-patch
Size: 1753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/4444f5a7/attachment.bin>


More information about the llvm-commits mailing list