[PATCH][LNT] better code coverage in lit tests of lnt runtest

Chris Matthews chris.matthews at apple.com
Tue Aug 13 11:35:56 PDT 2013


This patch adds better code coverage for the runtest lit tests by calling runtest with an assortment of options.

Index: tests/runtest/nt.py
===================================================================
--- tests/runtest/nt.py	(revision 188243)
+++ tests/runtest/nt.py	(working copy)
@@ -6,6 +6,34 @@
 # RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
 # RUN:   --no-timestamp > %t.log 2> %t.err
 #
+# Use the same sandbox again with --no-configure
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --no-timestamp --no-configure >> %t.log 2>> %t.err
+#
+# Manually set a run order.
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --no-timestamp --no-configure --run-order 123 >> %t.log 2>> %t.err
+#
+# Change the machine name. Don't use LLVM.
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --without-llvm --no-auto-name foo >> %t.log 2>> %t.err
+#
+# Run with sandboxing enabled.
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --no-timestamp --use-isolation >> %t.log 2>> %t.err
+#
 # RUN: FileCheck --check-prefix CHECK-STDOUT < %t.log %s
 # RUN: FileCheck --check-prefix CHECK-STDERR < %t.err %s
 #
@@ -26,5 +54,77 @@
 # CHECK-STDERR: capturing machine information
 # CHECK-STDERR: generating report
 # CHECK-STDERR: submitting result to dummy instance
+# Testing for the 'lnt runtest nt' module.
+#
+#
+# CHECK-STDOUT: Import succeeded.
+# CHECK-STDOUT: Added Machines: 1
+# CHECK-STDOUT: Added Runs    : 1
+# CHECK-STDOUT: Added Tests   : 130
+# CHECK-STDOUT: --- Tested: 260 tests --
 
+# CHECK-STDERR: inferred C++ compiler under test
+# CHECK-STDERR: checking source versions
+# CHECK-STDERR: using nickname
+# CHECK-STDERR: starting test
+# CHECK-STDERR: building test-suite tools
+# CHECK-STDERR: executing "nightly tests" with -j1
+# CHECK-STDERR: loading nightly test data
+# CHECK-STDERR: capturing machine information
+# CHECK-STDERR: generating report
+# CHECK-STDERR: submitting result to dummy instance
+#
+# CHECK-STDOUT: Import succeeded.
+# CHECK-STDOUT: Added Machines: 1
+# CHECK-STDOUT: Added Runs    : 1
+# CHECK-STDOUT: Added Tests   : 130
+# CHECK-STDOUT: --- Tested: 260 tests --
+# CHECK-STDERR: inferred C++ compiler under test
+# CHECK-STDERR: checking source versions
+# CHECK-STDERR: using nickname
+# CHECK-STDERR: starting test
+# CHECK-STDERR: building test-suite tools
+# CHECK-STDERR: executing "nightly tests" with -j1
+# CHECK-STDERR: loading nightly test data
+# CHECK-STDERR: capturing machine information
+# CHECK-STDERR: generating report
+# CHECK-STDERR: submitting result to dummy instance
+#
+# CHECK-STDOUT: Import succeeded.
+# CHECK-STDOUT: Added Machines: 1
+# CHECK-STDOUT: Added Runs    : 1
+# CHECK-STDOUT: Added Tests   : 130
+# CHECK-STDOUT: --- Tested: 260 tests --
+# CHECK-STDERR: inferred C++ compiler under test
+# CHECK-STDERR: checking source versions
+# CHECK-STDERR: using nickname: 'foo'
+# CHECK-STDERR: starting test
+# CHECK-STDERR: configuring
+# CHECK-STDERR: building test-suite tools
+# CHECK-STDERR: executing "nightly tests" with -j1
+# CHECK-STDERR: loading nightly test data
+# CHECK-STDERR: capturing machine information
+# CHECK-STDERR: generating report
+# CHECK-STDERR: submitting result to dummy instance
+#
+# CHECK-STDOUT: Import succeeded.
+# CHECK-STDOUT: Added Machines: 1
+# CHECK-STDOUT: Added Runs    : 1
+# CHECK-STDOUT: Added Tests   : 130
+# CHECK-STDOUT: --- Tested: 260 tests --
 
+# CHECK-STDERR: inferred C++ compiler under test
+# CHECK-STDERR: checking source versions
+# CHECK-STDERR: using nickname
+# CHECK-STDERR: starting test
+# CHECK-STDERR: configuring
+# CHECK-STDERR: building test-suite tools
+# CHECK-STDERR: creating sandbox profile
+# CHECK-STDERR: executing "nightly tests" with -j1
+# CHECK-STDERR: loading nightly test data
+# CHECK-STDERR: capturing machine information
+# CHECK-STDERR: generating report
+# CHECK-STDERR: submitting result to dummy instance
+# Testing for the 'lnt runtest nt' module.


Chris Matthews
chris.matthews at apple.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/e87eb4a5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runtest_coverage.patch
Type: application/octet-stream
Size: 4333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/e87eb4a5/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/e87eb4a5/attachment-0001.html>


More information about the llvm-commits mailing list