<div class="gmail_quote">On Sat, Feb 27, 2010 at 2:11 PM, Derek Bruening <span dir="ltr"><<a href="mailto:iye@alum.mit.edu">iye@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have a ctest command script that runs a series of builds and tests via<br>
ctest_start(), ctest_test(), etc. I want to run the tests in parallel by<br>
default (I'm using cmake 2.8.0). If I pass -j to the ctest command that<br>
invokes the script, the tests are run in parallel:<br>
<br>
ctest -j5 -S /path/to/script.cmake<br>
<br>
However if I pass the -j via CTEST_COMMAND:<br>
<br>
set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME} -j5")<br>
<br>
and do not pass it in when invoking the script, the tests are not run in<br>
parallel. Why is that? Is there some way to accomplish this?<br></blockquote><div><br></div><div>I think you want to add the PARALLEL_LEVEL argument to the ctest_test command,</div><div><br></div><div>ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 8)</div>
<div><br></div><div>This command would run up to eight tests in parallel.</div><div><br></div><div>Marcus</div></div>