[LNT] r276218 - Add a --only-compile flag, which stop the benchmarks from being run

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 17:10:43 PDT 2016


Author: cmatthews
Date: Wed Jul 20 19:10:42 2016
New Revision: 276218

URL: http://llvm.org/viewvc/llvm-project?rev=276218&view=rev
Log:
Add a --only-compile flag, which stop the benchmarks from being run

Sometimes it is nice to only compile the tests and not run them, for
instance to look for compiler assertions, or track compile time or code
size.

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=276218&r1=276217&r2=276218&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Wed Jul 20 19:10:42 2016
@@ -147,6 +147,9 @@ class TestSuiteTest(BuiltinTest):
         parser.add_option_group(group)
 
         group = OptionGroup(parser, "Test Execution")
+        group.add_option("", "--only-compile", dest="only_compile",
+                         help="Don't run the tests, just compile them.",
+                         action="store_true", default=False, )
         group.add_option("-j", "--threads", dest="threads",
                          help="Number of testing (and optionally build) "
                          "threads", type=int, default=1, metavar="N")
@@ -457,6 +460,8 @@ class TestSuiteTest(BuiltinTest):
             defs['TEST_SUITE_RUN_UNDER'] = self._unix_quote_args(self.opts.run_under)
         if self.opts.benchmarking_only:
             defs['TEST_SUITE_BENCHMARKING_ONLY'] = 'ON'
+        if self.opts.only_compile:
+            defs['TEST_SUITE_RUN_BENCHMARKS'] = 'Off'
         if self.opts.use_perf in ('time', 'all'):
             defs['TEST_SUITE_USE_PERF'] = 'ON'
         if self.opts.test_suite_externals:

Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=276218&r1=276217&r2=276218&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Wed Jul 20 19:10:42 2016
@@ -380,3 +380,18 @@
 # CHECK-PGO: TEST_SUITE_PROFILE_GENERATE: 'On'
 # CHECK-PGO: TEST_SUITE_PROFILE_GENERATE: 'Off'
 # CHECK-PGO: TEST_SUITE_PROFILE_USE: 'On'
+
+# Check running with compile only
+# RUN: lnt runtest test-suite \
+# RUN:     --sandbox %t.SANDBOX \
+# RUN:     --no-timestamp \
+# 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-profile \
+# RUN:     --verbose \
+# RUN:     --only-compile \
+# RUN:     > %t.pgo.log 2> %t.compile-only.err
+# RUN: FileCheck --check-prefix CHECK-CO < %t.compile-only.err %s
+# CHECK-CO: TEST_SUITE_RUN_BENCHMARKS: 'Off'




More information about the llvm-commits mailing list