<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">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 class="" style="white-space:pre">        </span> 30 - CppcheckStyle (Failed)</font></div>
<div><font size="1" face="courier new, monospace"><span class="" style="white-space:pre">        </span> 31 - CppcheckPerformance (Failed)</font></div><div><font size="1" face="courier new, monospace"><span class="" style="white-space:pre">        </span> 32 - CppcheckPortability (Failed)</font></div>
<div><font size="1" face="courier new, monospace"><span class="" style="white-space:pre">        </span> 33 - CppcheckInformation (Failed)</font></div><div><font size="1" face="courier new, monospace"><span class="" style="white-space:pre">        </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 class="" style="white-space:pre">        </span>6m18.135s</font></div>
<div><font size="1" face="courier new, monospace">user<span class="" style="white-space:pre">        </span>6m17.444s</font></div><div><font size="1" face="courier new, monospace">sys<span class="" style="white-space:pre">        </span>0m0.332s</font></div>
<div><br></div><div><br></div><div style>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 style><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 style>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 style><br></div><div style>Thanks for all your help,</div></div>-- <br>Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div style>919.869.8871</div>
</div></div>