[LNT] r261847 - [test-suite] Add support for --use-perf
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 02:04:32 PST 2016
Author: jamesm
Date: Thu Feb 25 04:04:32 2016
New Revision: 261847
URL: http://llvm.org/viewvc/llvm-project?rev=261847&view=rev
Log:
[test-suite] Add support for --use-perf
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=261847&r1=261846&r2=261847&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Thu Feb 25 04:04:32 2016
@@ -112,7 +112,7 @@ class TestSuiteTest(BuiltinTest):
group.add_option("", "--use-perf", dest="use_perf",
help=("Use perf to obtain high accuracy timing"
"[%default]"),
- type=str, default=None)
+ action='store_true', default=False)
group.add_option("", "--run-under", dest="run_under",
help="Wrapper to run tests under ['%default']",
type=str, default="")
@@ -172,8 +172,7 @@ class TestSuiteTest(BuiltinTest):
else:
parser.error("Expected no positional arguments (got: %r)" % (args,))
- for a in ['cross_compiling', 'cross_compiling_system_name', 'llvm_arch',
- 'use_perf']:
+ for a in ['cross_compiling', 'cross_compiling_system_name', 'llvm_arch']:
if getattr(opts, a):
parser.error('option "%s" is not yet implemented!' % a)
@@ -349,7 +348,9 @@ 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.use_perf:
+ defs['TEST_SUITE_USE_PERF'] = 'ON'
+
lines = ['Configuring with {']
for k,v in defs.items():
lines.append(" %s: '%s'" % (k,v))
Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=261847&r1=261846&r2=261847&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Thu Feb 25 04:04:32 2016
@@ -231,3 +231,19 @@
# CHECK-BENCHONLY: Configuring with {
# CHECK-BENCHONLY: TEST_SUITE_BENCHMARKING_ONLY: 'ON'
+# Check --use-perf
+# 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 \
+# RUN: --use-perf \
+# RUN: --verbose \
+# RUN: > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-USE-PERF < %t.err %s
+# CHECK-USE-PERF: Configuring with {
+# CHECK-USE-PERF: TEST_SUITE_USE_PERF: 'ON'
+
More information about the llvm-commits
mailing list