<div dir="ltr">Hi Chris,<div><br></div><div>A couple comments:</div><div><br></div><div>1. It would be better to break down the FileCheck lines to be paired with each individual invocation (instead of collecting all of the output together in one log).</div>
<div><br></div><div>2. It would be good to "focus" the tests a bit more. For example, if one of the tests is going to check --no-auto-name, then the matching FileCheck test should verify that the right name is in the result, but not check a variety of other unassociated things. If those things need to be checked as well, better to write an explicit test to check all the generic stuff, and the focused stuff to check the various corners. This makes it easier to maintain the tests over time and more clear about what is actually trying to be tested with the different checks.</div>
<div><br></div><div> - Daniel</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 11:35 AM, Chris Matthews <span dir="ltr"><<a href="mailto:chris.matthews@apple.com" target="_blank">chris.matthews@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">This patch adds better code coverage for the runtest lit tests by calling runtest with an assortment of options.<div>
<br></div><div><div>Index: tests/runtest/nt.py</div><div>===================================================================</div><div>--- tests/runtest/nt.py<span style="white-space:pre-wrap">       </span>(revision 188243)</div>
<div>+++ tests/runtest/nt.py<span style="white-space:pre-wrap">   </span>(working copy)</div><div>@@ -6,6 +6,34 @@</div><div> # RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \</div><div> # RUN:   --no-timestamp > %t.log 2> %t.err</div>
<div> #</div><div>+# Use the same sandbox again with --no-configure</div><div>+# RUN: lnt runtest nt \</div><div>+# RUN:   --sandbox %t.SANDBOX \</div><div>+# RUN:   --test-suite %S/Inputs/test-suite \</div><div>+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \</div>
<div>+# RUN:   --no-timestamp --no-configure >> %t.log 2>> %t.err</div><div>+#</div><div>+# Manually set a run order.</div><div>+# RUN: lnt runtest nt \</div><div>+# RUN:   --sandbox %t.SANDBOX \</div><div>+# RUN:   --test-suite %S/Inputs/test-suite \</div>
<div>+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \</div><div>+# RUN:   --no-timestamp --no-configure --run-order 123 >> %t.log 2>> %t.err</div><div>+#</div><div>+# Change the machine name. Don't use LLVM.</div>
<div>+# RUN: lnt runtest nt \</div><div>+# RUN:   --sandbox %t.SANDBOX \</div><div>+# RUN:   --test-suite %S/Inputs/test-suite \</div><div>+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \</div><div>+# RUN:   --without-llvm --no-auto-name foo >> %t.log 2>> %t.err</div>
<div>+#</div><div>+# Run with sandboxing enabled.</div><div>+# RUN: lnt runtest nt \</div><div>+# RUN:   --sandbox %t.SANDBOX \</div><div>+# RUN:   --test-suite %S/Inputs/test-suite \</div><div>+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \</div>
<div>+# RUN:   --no-timestamp --use-isolation >> %t.log 2>> %t.err</div><div>+#</div><div> # RUN: FileCheck --check-prefix CHECK-STDOUT < %t.log %s</div><div> # RUN: FileCheck --check-prefix CHECK-STDERR < %t.err %s</div>
<div> #</div><div>@@ -26,5 +54,77 @@</div><div> # CHECK-STDERR: capturing machine information</div><div> # CHECK-STDERR: generating report</div><div> # CHECK-STDERR: submitting result to dummy instance</div><div>+# Testing for the 'lnt runtest nt' module.</div>
<div>+#</div><div>+#</div><div>+# CHECK-STDOUT: Import succeeded.</div><div>+# CHECK-STDOUT: Added Machines: 1</div><div>+# CHECK-STDOUT: Added Runs    : 1</div><div>+# CHECK-STDOUT: Added Tests   : 130</div><div>+# CHECK-STDOUT: --- Tested: 260 tests --</div>
<div> </div><div>+# CHECK-STDERR: inferred C++ compiler under test</div><div>+# CHECK-STDERR: checking source versions</div><div>+# CHECK-STDERR: using nickname</div><div>+# CHECK-STDERR: starting test</div><div>+# CHECK-STDERR: building test-suite tools</div>
<div>+# CHECK-STDERR: executing "nightly tests" with -j1</div><div>+# CHECK-STDERR: loading nightly test data</div><div>+# CHECK-STDERR: capturing machine information</div><div>+# CHECK-STDERR: generating report</div>
<div>+# CHECK-STDERR: submitting result to dummy instance</div><div>+#</div><div>+# CHECK-STDOUT: Import succeeded.</div><div>+# CHECK-STDOUT: Added Machines: 1</div><div>+# CHECK-STDOUT: Added Runs    : 1</div><div>+# CHECK-STDOUT: Added Tests   : 130</div>
<div>+# CHECK-STDOUT: --- Tested: 260 tests --</div><div>+# CHECK-STDERR: inferred C++ compiler under test</div><div>+# CHECK-STDERR: checking source versions</div><div>+# CHECK-STDERR: using nickname</div><div>+# CHECK-STDERR: starting test</div>
<div>+# CHECK-STDERR: building test-suite tools</div><div>+# CHECK-STDERR: executing "nightly tests" with -j1</div><div>+# CHECK-STDERR: loading nightly test data</div><div>+# CHECK-STDERR: capturing machine information</div>
<div>+# CHECK-STDERR: generating report</div><div>+# CHECK-STDERR: submitting result to dummy instance</div><div>+#</div><div>+# CHECK-STDOUT: Import succeeded.</div><div>+# CHECK-STDOUT: Added Machines: 1</div><div>+# CHECK-STDOUT: Added Runs    : 1</div>
<div>+# CHECK-STDOUT: Added Tests   : 130</div><div>+# CHECK-STDOUT: --- Tested: 260 tests --</div><div>+# CHECK-STDERR: inferred C++ compiler under test</div><div>+# CHECK-STDERR: checking source versions</div><div>+# CHECK-STDERR: using nickname: 'foo'</div>
<div>+# CHECK-STDERR: starting test</div><div>+# CHECK-STDERR: configuring</div><div>+# CHECK-STDERR: building test-suite tools</div><div>+# CHECK-STDERR: executing "nightly tests" with -j1</div><div>+# CHECK-STDERR: loading nightly test data</div>
<div>+# CHECK-STDERR: capturing machine information</div><div>+# CHECK-STDERR: generating report</div><div>+# CHECK-STDERR: submitting result to dummy instance</div><div>+#</div><div>+# CHECK-STDOUT: Import succeeded.</div>
<div>+# CHECK-STDOUT: Added Machines: 1</div><div>+# CHECK-STDOUT: Added Runs    : 1</div><div>+# CHECK-STDOUT: Added Tests   : 130</div><div>+# CHECK-STDOUT: --- Tested: 260 tests --</div><div> </div><div>+# CHECK-STDERR: inferred C++ compiler under test</div>
<div>+# CHECK-STDERR: checking source versions</div><div>+# CHECK-STDERR: using nickname</div><div>+# CHECK-STDERR: starting test</div><div>+# CHECK-STDERR: configuring</div><div>+# CHECK-STDERR: building test-suite tools</div>
<div>+# CHECK-STDERR: creating sandbox profile</div><div>+# CHECK-STDERR: executing "nightly tests" with -j1</div><div>+# CHECK-STDERR: loading nightly test data</div><div>+# CHECK-STDERR: capturing machine information</div>
<div>+# CHECK-STDERR: generating report</div><div>+# CHECK-STDERR: submitting result to dummy instance</div><div>+# Testing for the 'lnt runtest nt' module.</div><div><br></div><div>
<div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px"><div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px">
<div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px"><div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px">
</div></div></div></div></div></div></div><br><div style="word-wrap:break-word"><div><div><div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px">
<div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px"><div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px">
<div style="text-indent:0px;letter-spacing:normal;text-align:start;text-transform:none;white-space:normal;word-wrap:break-word;word-spacing:0px"><br><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px">Chris Matthews</span><br style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;font-family:Helvetica;font-weight:normal;word-spacing:0px">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><a href="mailto:chris.matthews@apple.com" target="_blank">chris.matthews@apple.com</a></span><br style="line-height:normal;text-indent:0px;letter-spacing:normal;text-align:start;font-variant:normal;text-transform:none;font-style:normal;white-space:normal;font-family:Helvetica;font-weight:normal;word-spacing:0px">
</div></div></div></div>
</div>
<br></div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>