[LNT][PATCH] update runtest lit test cases

Chris Matthews chris.matthews at apple.com
Thu Aug 8 13:09:22 PDT 2013


This patch updates the runtest lit test cases to cover two extra code paths, —multisample and —only-test.


Index: tests/runtest/Inputs/test-suite/configure
===================================================================
--- tests/runtest/Inputs/test-suite/configure	(revision 187526)
+++ tests/runtest/Inputs/test-suite/configure	(working copy)
@@ -6,6 +6,7 @@
 
 echo "Copying in Makefile..."
 cp $SRC_PATH/Makefile .
+cp $SRC_PATH/subtest/Makefile ./subtest/
 
 echo "Creating Makefile.config..."
 echo "PROJ_SRC_ROOT = \"${SRC_PATH}\"" > Makefile.config
Index: tests/runtest/Inputs/test-suite/subtest/Makefile
===================================================================
--- tests/runtest/Inputs/test-suite/subtest/Makefile	(revision 0)
+++ tests/runtest/Inputs/test-suite/subtest/Makefile	(working copy)
@@ -0,0 +1,13 @@
+# Fake makefile
+
+include ../Makefile.config
+
+tools:
+	echo "This is a fake tools build."
+
+report:
+	echo "This is a fake report build."
+.PHONY: report
+
+report.simple.csv: report
+	cp ${PROJ_SRC_ROOT}/fake-report.simple.csv $@
Index: tests/runtest/multisample.py
===================================================================
--- tests/runtest/multisample.py	(revision 0)
+++ tests/runtest/multisample.py	(working copy)
@@ -0,0 +1,32 @@
+# Testing for the 'lnt runtest nt' module.
+#
+# 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 --multisample 2 > %t.log 2> %t.err
+#
+# RUN: FileCheck --check-prefix CHECK-STDOUT < %t.log %s
+# RUN: FileCheck --check-prefix CHECK-STDERR < %t.err %s
+#
+# 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: (multisample) running iteration 0
+# CHECK-STDERR: checking source versions
+# CHECK-STDERR: using nickname
+# 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: (multisample) running iteration 1
+# CHECK-STDERR: submitting result to dummy instance
+
+
Index: tests/runtest/only_test.py
===================================================================
--- tests/runtest/only_test.py	(revision 0)
+++ tests/runtest/only_test.py	(working copy)
@@ -0,0 +1,31 @@
+# Testing for the 'lnt runtest nt' module.
+#
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --only-test subtest \
+# RUN:   --no-timestamp > %t.log 2> %t.err
+#
+# RUN: FileCheck --check-prefix CHECK-STDOUT < %t.log %s
+# RUN: FileCheck --check-prefix CHECK-STDERR < %t.err %s
+#
+# 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: 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
+
+



Chris Matthews
chris.matthews at apple.com
(408) 783-6335

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


More information about the llvm-commits mailing list