<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, May 31, 2014 at 7:18 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 01/06/2014 04:54, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
On Sat, May 31, 2014 at 6:46 PM, Alp Toker <<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a> <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>>> wrote:<br>
<br>
<br>
    On 01/06/2014 04:05, Richard Smith wrote:<br>
<br>
        On Sun, May 4, 2014 at 11:42 PM, Alp Toker <<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a><br></div>
        <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>> <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a><div><div class="h5"><br>
        <mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>>>> wrote:<br>
<br>
            Author: alp<br>
            Date: Mon May  5 01:42:07 2014<br>
            New Revision: 207951<br>
<br>
            URL: <a href="http://llvm.org/viewvc/llvm-project?rev=207951&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=207951&view=rev</a><br>
            Log:<br>
            Update lit.cfg to support the clang-interpreter test from<br>
        r207950<br>
<br>
            Performs behind-the-scenes RUN line substitution similarly to<br>
            what's done with<br>
            clang-check and clang-format to ensure the executable is<br>
        found.<br>
<br>
            Modified:<br>
                cfe/trunk/test/CMakeLists.txt<br>
                cfe/trunk/test/lit.cfg<br>
<br>
            Modified: cfe/trunk/test/CMakeLists.txt<br>
            URL:<br>
        <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=207951&r1=207950&r2=207951&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/<u></u>CMakeLists.txt?rev=207951&r1=<u></u>207950&r2=207951&view=diff</a><br>

                   ==============================<u></u>==============================<u></u>==================<br>
            --- cfe/trunk/test/CMakeLists.txt (original)<br>
            +++ cfe/trunk/test/CMakeLists.txt Mon May  5 01:42:07 2014<br>
            @@ -29,6 +29,7 @@ list(APPEND CLANG_TEST_DEPS<br>
               c-index-test diagtool arcmt-test c-arcmt-test<br>
               clang-check clang-format<br>
               clang-tblgen<br>
            +  clang-interpreter<br>
<br>
<br>
        I'm all in favor of having buildbots check that the<br>
        clang-interpreter example still works, but is it really<br>
        sufficiently valuable to slow down *all* clang-test builds by<br>
        adding another (slow) link action? Can we make this only run<br>
        on the buildbots by default somehow?<br>
<br>
<br>
    They aren't run by default. Perhaps you're passing<br>
    -DCLANG_BUILD_EXAMPLES=1 which causes the examples to get built<br>
    and included in the test set?<br>
<br>
<br>
Nope.<br>
<br>
$ grep CLANG_BUILD_EXAMPLES build/CMakeCache.txt<br>
CLANG_BUILD_EXAMPLES:BOOL=OFF<br>
<br>
Note that your change above adds clang-interpreter unconditionally to CLANG_TEST_DEPS.<br>
</div></div></blockquote>
<br>
Fixed in r209983! However..<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
    I don't think it makes sense to have an additional mode that<br>
    enables the examples but excludes their tests.<br>
<br>
    I've just timed the test deps build with and without all examples<br>
    on an old laptop and the difference isn't measurable above noise:<br>
<br>
    With examples and example tests enabled:<br>
<br>
    touch ../upstream/clang/lib/Basic/<u></u>Diagnostic.cpp && time ninja<br>
    check-clang-deps<br>
    real    0m1.181s<br>
    user    0m2.648s<br>
    sys    0m1.061s<br>
<br>
    Without examples or example tests enabled:<br>
<br>
    touch ../upstream/clang/lib/Basic/<u></u>Diagnostic.cpp && time ninja<br>
    check-clang-deps<br>
    real    0m1.283s<br>
    user    0m2.637s<br>
    sys    0m1.065s<br>
<br>
    Beyond that, the complete run time for all the example tests<br>
    combined looks like it weighs in at ~1/20th of a second in a full<br>
    test run.<br>
<br>
<br>
The problem is the link time, not the runtime of the tests.<br>
</blockquote>
<br></div>
I don't see how this could have affected link time during development as the timings above demonstrate.<br></blockquote><div><br></div><div>Your before and after timings both include linking the binaries, don't they?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(Unless you're using LTO or static builds to develop,</blockquote><div><br></div><div>I don't know anyone who uses anything *other* than static builds. That's our default and recommended build configuration.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">which will have all kinds of overheads -- but why would anyone do that?)<br>
<br>
Alp.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
    Surely all of this is insignificant when there are tests that<br>
    generate large files or sleep for seconds? Also consider using lit<br>
    directly with the --incremental flag.<br>
<br>
    Alp.<br>
<br>
<br>
<br>
               PrintFunctionNames<br>
               SampleAnalyzerPlugin<br>
               )<br>
<br>
            Modified: cfe/trunk/test/lit.cfg<br>
            URL:<br>
        <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=207951&r1=207950&r2=207951&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/cfe/trunk/test/lit.<u></u>cfg?rev=207951&r1=207950&r2=<u></u>207951&view=diff</a><br>

                   ==============================<u></u>==============================<u></u>==================<br>
            --- cfe/trunk/test/lit.cfg (original)<br>
            +++ cfe/trunk/test/lit.cfg Mon May  5 01:42:07 2014<br>
            @@ -308,6 +308,7 @@ for pattern in [r"\bFileCheck\b",<br>
                             r"\bc-index-test\b",<br>
                             NoPreHyphenDot + r"\bclang-check\b" +<br>
            NoPostHyphenDot,<br>
                             NoPreHyphenDot + r"\bclang-format\b" +<br>
            NoPostHyphenDot,<br>
            +                NoPreHyphenDot + r"\bclang-interpreter\b" +<br>
            NoPostHyphenDot,<br>
                             # FIXME: Some clang test uses opt?<br>
                             NoPreHyphenDot + r"\bopt\b" +<br>
        NoPostHyphenDot,<br>
                             # Handle these specially as they are<br>
        strings searched<br>
<br>
<br>
            ______________________________<u></u>_________________<br>
            cfe-commits mailing list<br>
        <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.<u></u>edu</a>><br></div></div>
        <mailto:<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.<u></u>edu</a> <mailto:<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.<u></u>edu</a>>><div class="">
<br>
        <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-commits</a><br>
<br>
<br>
<br>
    --     <a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
    the browser experts<br>
<br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</div></div></blockquote></div><br></div></div>