[LNT] r258116 - [test-suite-cmake] Add rununder support
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 03:14:57 PST 2016
Author: jamesm
Date: Tue Jan 19 05:14:57 2016
New Revision: 258116
URL: http://llvm.org/viewvc/llvm-project?rev=258116&view=rev
Log:
[test-suite-cmake] Add rununder support
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=258116&r1=258115&r2=258116&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Tue Jan 19 05:14:57 2016
@@ -113,6 +113,9 @@ class TestSuiteTest(BuiltinTest):
help=("Use perf to obtain high accuracy timing"
"[%default]"),
type=str, default=None)
+ group.add_option("", "--run-under", dest="run_under",
+ help="Wrapper to run tests under ['%default']",
+ type=str, default="")
group.add_option("", "--exec-multisample", dest="exec_multisample",
help="Accumulate execution test data from multiple runs",
type=int, default=1, metavar="N")
@@ -215,6 +218,11 @@ class TestSuiteTest(BuiltinTest):
opts.lit = resolve_command_path(opts.lit)
if not isexecfile(opts.lit):
parser.error("LIT tool not found (looked for %s)" % opts.lit)
+ if opts.run_under:
+ opts.run_under = resolve_command_path(opts.run_under)
+ if not isexecfile(opts.run_under):
+ parser.error("Run under wrapper not found (looked for %s)" %
+ opts.run_under)
opts.cppflags = ' '.join(opts.cppflags)
opts.cflags = ' '.join(opts.cflags)
@@ -331,6 +339,8 @@ class TestSuiteTest(BuiltinTest):
'CMAKE_CXX_FLAGS': self._unix_quote_args(' '.join([self.opts.cppflags,
self.opts.cxxflags]))
}
+ if self.opts.run_under:
+ defs['TEST_SUITE_RUN_UNDER'] = self._unix_quote_args(self.opts.run_under)
lines = ['Configuring with {']
for k,v in defs.items():
Modified: lnt/trunk/tests/runtest/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/test_suite.py?rev=258116&r1=258115&r2=258116&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/test_suite.py (original)
+++ lnt/trunk/tests/runtest/test_suite.py Tue Jan 19 05:14:57 2016
@@ -169,3 +169,33 @@
# RUN: FileCheck --check-prefix CHECK-CFLAG5 < %t.err %s
# CHECK-CFLAG5: Inferred C++ compiler under test
# CHECK-CFLAG5: CMAKE_C_FLAGS: '--target=armv7a-none-eabi -Weverything -Wall '-test=escaped space' '-some-option=stay with me' -O3
+
+# Use a run-under command
+# RUN: not 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-under bar \
+# RUN: > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-RUNUNDER1 < %t.err %s
+# CHECK-RUNUNDER1: Run under wrapper not found (looked for bar)
+
+# Use a run-under command
+# 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: --run-under %S/Inputs/test-suite-cmake/fake-make \
+# RUN: > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-RUNUNDER2 < %t.err %s
+# CHECK-RUNUNDER2: TEST_SUITE_RUN_UNDER: '{{.*}}/fake-make'
+
More information about the llvm-commits
mailing list