<div dir="ltr">Why not just run "make Experimental" instead?<div><br></div><div>If your tests already run the checkers that you want, then just running the tests is sufficient. You don't need to run make ExperimentalMemCheck if your checkers run as part of your test suite...</div>
<div><br></div><div style>Running the MemCheck runs all tests via the memory checker.</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 3, 2013 at 2:47 PM, Christopher Mullins <span dir="ltr"><<a href="mailto:christopher.mullins@kitware.com" target="_blank">christopher.mullins@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">As a followup, I think I may have found part of the problem. <div>When I run $ ctest -N -VV -D ExperimentalMemCheck, I see test #29 listed as follows:</div>
<div><br></div><div><div><font face="courier new, monospace" size="1">29: MemCheck command: /usr/bin/valgrind "-q" "--tool=memcheck" "--leak-check=yes" "--show-reachable=yes" "--workaround-gcc296-bugs=yes" "--num-callers=50" "/home/crmullin/cppcheck/cppcheck/cppcheck" "-q" "--xml" "--suppressions" "/home/crmullin/TubeTK/Utilities/Cppcheck/TubeTKCppcheck.supp" "--enable=style" "/home/crmullin/TubeTK/Applications" "/home/crmullin/TubeTK/Base" "/home/crmullin/TubeTK/Utilities/Testing"</font></div>
<div><font face="courier new, monospace" size="1"> Memory Check #29: CppcheckStyle</font></div><div><font face="courier new, monospace" size="1">Memory check command: /usr/bin/valgrind "-q" "--tool=memcheck" "--leak-check=yes" "--show-reachable=yes" "--workaround-gcc296-bugs=yes" "--num-callers=50"</font></div>
<div><font face="courier new, monospace" size="1"><br></font></div><div><font face="arial, helvetica, sans-serif">Then if I run $ ctest -N -VV -R "CppcheckStyle", I see this same test listed as follows:</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="courier new, monospace" size="1">30: Test command: /home/crmullin/cppcheck/cppcheck/cppcheck "-q" "--xml" "--suppressions" "/home/crmullin/TubeTK/Utilities/Cppcheck/TubeTKCppcheck.supp" "--enable=style" "/home/crmullin/TubeTK/Applications" "/home/crmullin/TubeTK/Base" "/home/crmullin/TubeTK/Utilities/Testing"</font></div>
<div><font face="courier new, monospace" size="1"> Test #30: CppcheckStyle</font></div><div><font face="courier new, monospace" size="1"><br></font></div><div><font face="arial, helvetica, sans-serif">The first method of invoking the test is running, but it runs incredibly slowly, because it is primarily running valgrind, and not cppcheck! The second method is actually running cppcheck correctly, and thus it is running more quickly. Does anyone know how to instruct CTest to use the correct executable? I am having the same issue with the Cppcheck integration in CalaTk, it appears to be maybe the same issue (although it's hard to tell because Cppcheck is turned off by default in CalaTK, as we can see <a href="http://open.cdash.org/index.php?project=calaTK" target="_blank">on the CalaTK dashboards</a>).</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks for any help you can provide!</font></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br>
<div class="gmail_quote">On Wed, Jan 2, 2013 at 3:57 PM, Christopher Mullins <span dir="ltr"><<a href="mailto:christopher.mullins@kitware.com" target="_blank">christopher.mullins@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello CMake community,<div><br></div><div>I am attempting to incorporate Cppcheck into the code analysis section of the TubeTK dashboard. It's static code analysis, distinct from dynamic code analysis tools like Valgrind, but I'm simply incorporating the checks for Style, Performance, Portability, Information, and UnusedFunctions as additional tests in the same category. Basically I'm trying to mimic what has been accomplished <a href="http://www.calatk.org/gitweb?p=calatk.git;a=blob;f=Code/Testing/CMakeLists.txt;h=2e900af70d5c6353b7dae38b5ebdb3282cbc4750;hb=HEAD#l1031" target="_blank">in the CalaTK project.</a></div>
<div><br></div><div>The issue I'm having is that the tests now run as such:</div><div><div><font size="1" face="courier new, monospace">TreCime ~/Projects/tubetk-cppcheck/TubeTK-Build $ time ctest -R "Cppcheck"</font></div>
<div><font size="1" face="courier new, monospace">Test project /home/crmullin/Projects/tubetk-cppcheck/TubeTK-Build</font></div><div><font size="1" face="courier new, monospace"> Start 30: CppcheckStyle</font></div><div>
<font size="1" face="courier new, monospace">1/5 Test #30: CppcheckStyle ....................***Failed Error regular expression found in output. Regex=[error file=] 77.12 sec</font></div><div><font size="1" face="courier new, monospace"> Start 31: CppcheckPerformance</font></div>
<div><font size="1" face="courier new, monospace">2/5 Test #31: CppcheckPerformance ..............***Failed Error regular expression found in output. Regex=[error file=] 74.77 sec</font></div><div><font size="1" face="courier new, monospace"> Start 32: CppcheckPortability</font></div>
<div><font size="1" face="courier new, monospace">3/5 Test #32: CppcheckPortability ..............***Failed Error regular expression found in output. Regex=[error file=] 75.78 sec</font></div><div><font size="1" face="courier new, monospace"> Start 33: CppcheckInformation</font></div>
<div><font size="1" face="courier new, monospace">4/5 Test #33: CppcheckInformation ..............***Failed Error regular expression found in output. Regex=[error file=] 75.37 sec</font></div><div><font size="1" face="courier new, monospace"> Start 34: CppcheckUnusedFunction</font></div>
<div><font size="1" face="courier new, monospace">5/5 Test #34: CppcheckUnusedFunction ...........***Failed Error regular expression found in output. Regex=[error file=] 75.02 sec</font></div><div><font size="1" face="courier new, monospace"><br>
</font></div><div><font size="1" face="courier new, monospace">0% tests passed, 5 tests failed out of 5</font></div><div><font size="1" face="courier new, monospace"><br></font></div><div><font size="1" face="courier new, monospace">Total Test time (real) = 378.13 sec</font></div>
<div><font size="1" face="courier new, monospace"><br></font></div><div><font size="1" face="courier new, monospace">The following tests FAILED:</font></div><div><font size="1" face="courier new, monospace"><span style="white-space:pre-wrap">        </span> 30 - CppcheckStyle (Failed)</font></div>
<div><font size="1" face="courier new, monospace"><span style="white-space:pre-wrap">        </span> 31 - CppcheckPerformance (Failed)</font></div><div><font size="1" face="courier new, monospace"><span style="white-space:pre-wrap">        </span> 32 - CppcheckPortability (Failed)</font></div>
<div><font size="1" face="courier new, monospace"><span style="white-space:pre-wrap">        </span> 33 - CppcheckInformation (Failed)</font></div><div><font size="1" face="courier new, monospace"><span style="white-space:pre-wrap">        </span> 34 - CppcheckUnusedFunction (Failed)</font></div>
<div><font size="1" face="courier new, monospace">Errors while running CTest</font></div><div><font size="1" face="courier new, monospace"><br></font></div><div><font size="1" face="courier new, monospace">real<span style="white-space:pre-wrap">        </span>6m18.135s</font></div>
<div><font size="1" face="courier new, monospace">user<span style="white-space:pre-wrap">        </span>6m17.444s</font></div><div><font size="1" face="courier new, monospace">sys<span style="white-space:pre-wrap">        </span>0m0.332s</font></div>
<div><br></div><div><br></div><div>This is great. It takes only a few minutes to complete, and fails when it should. The same tests are <b>timing out</b> when I run $ make ExperimentalMemcheck:</div><div><div>
<font face="courier new, monospace" size="1">Start 27: ImageCompareCommand-Test6_fetchData</font></div><div><font face="courier new, monospace" size="1"> 27/618 MemCheck #27: ImageCompareCommand-Test6_fetchData ............................................................................... Passed 3.50 sec</font></div>
<div><font face="courier new, monospace" size="1"> Start 28: ImageCompareCommand-Test6</font></div><div><font face="courier new, monospace" size="1"> 28/618 MemCheck #28: ImageCompareCommand-Test6 ......................................................................................... Passed 3.08 sec</font></div>
<div><font face="courier new, monospace" size="1"> Start 29: CppcheckStyle</font></div><div><font face="courier new, monospace" size="1"> 29/618 MemCheck #29: CppcheckStyle .....................................................................................................***Timeout 1500.04 sec</font></div>
<div><font face="courier new, monospace" size="1"> Start 30: CppcheckPerformance</font></div><div><font face="courier new, monospace" size="1"> 30/618 MemCheck #30: CppcheckPerformance ...............................................................................................***Timeout 1500.04 sec</font></div>
<div><font face="courier new, monospace" size="1"> Start 31: CppcheckPortability</font></div><div><font face="courier new, monospace" size="1"> 31/618 MemCheck #31: CppcheckPortability ...............................................................................................***Timeout 1500.03 sec</font></div>
<div><font face="courier new, monospace" size="1"> Start 32: CppcheckInformation</font></div><div><font face="courier new, monospace" size="1"> 32/618 MemCheck #32: CppcheckInformation ...............................................................................................***Timeout 1500.04 sec</font></div>
<div><br></div><div>During this time the process appears to be CPU-bound, so I don't think there is some blocking issue that I'm not seeing keeping the test idle. Has anyone else encountered this problem? Is this a CTest issue at all?</div>
<div><br></div><div>Thanks for all your help,</div></div><span><font color="#888888">-- <br>Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div><a href="tel:919.869.8871" value="+19198698871" target="_blank">919.869.8871</a></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div><a href="tel:919.869.8871" value="+19198698871" target="_blank">919.869.8871</a></div>
</div>
</div></div><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>