[LNT] r258054 - [test-suite-cmake] Add support for setting run_order

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 09:03:44 PST 2016


Author: jamesm
Date: Mon Jan 18 11:03:43 2016
New Revision: 258054

URL: http://llvm.org/viewvc/llvm-project?rev=258054&view=rev
Log:
[test-suite-cmake] Add support for setting run_order

Modified:
    lnt/trunk/lnt/tests/test_suite.py
    lnt/trunk/tests/runtest/test_suite.py

Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=258054&r1=258053&r2=258054&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Mon Jan 18 11:03:43 2016
@@ -126,6 +126,9 @@ class TestSuiteTest(BuiltinTest):
         group.add_option("", "--no-auto-name", dest="auto_name",
                          help="Don't automatically derive submission name",
                          action="store_false", default=True)
+        group.add_option("", "--run-order", dest="run_order", metavar="STR",
+                         help="String to use to identify and order this run",
+                         action="store", type=str, default=None)
         group.add_option("", "--submit", dest="submit_url", metavar="URLORPATH",
                          help=("autosubmit the test result to the given server"
                                " (or local instance) [%default]"),
@@ -444,6 +447,8 @@ class TestSuiteTest(BuiltinTest):
         }
         run_info.update(self._get_cc_info())
         run_info['run_order'] = run_info['inferred_run_order']
+        if self.opts.run_order:
+            run_info['run_order'] = self.opts.run_order
         
         machine_info = {
         }

Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=258054&r1=258053&r2=258054&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Mon Jan 18 11:03:43 2016
@@ -60,6 +60,20 @@
 # RUN: FileCheck --check-prefix CHECK-NOCONF2 < %t.err %s
 # CHECK-NOCONF2: Configuring
 
+# Manually set a run order.
+# RUN: lnt runtest test-suite \
+# RUN:     --sandbox %t.SANDBOX \
+# RUN:     --no-timestamp \
+# RUN:     --no-configure \
+# RUN:     --test-suite %S/Inputs/test-suite-cmake \
+# RUN:     --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:     --use-cmake %S/Inputs/test-suite-cmake/fake-cmake \
+# RUN:     --use-make %S/Inputs/test-suite-cmake/fake-make \
+# RUN:     --use-lit %S/Inputs/test-suite-cmake/fake-lit \
+# RUN:     --run-order=123 > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-RESULTS < %t.SANDBOX/build/report.json %s
+# CHECK-RESULTS: "run_order": "123"
+
 # Change the machine name. Don't use LLVM.
 # RUN: lnt runtest test-suite \
 # RUN:     --sandbox %t.SANDBOX \




More information about the llvm-commits mailing list