<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I'm trying to fix: <a class="moz-txt-link-freetext" href="http://public.kitware.com/Bug/view.php?id=14484">http://public.kitware.com/Bug/view.php?id=14484</a><br>
which I reported earlier.<br>
<br>
I pushed my topic "ctest-fix-run-serial" to stage.<br>
<br>
Could some of you take a look at my changes?<br>
They seem to fix the issue for me and don't seem to break any of the
existing tests but <br>
the code is foreign to me and I am not aware of the history and
potential pitfalls that go with it.<br>
<br>
I use an updated test case that I attached to this mail (I hope it
gets preserved in the mailing list) otherwise I hope at least this
paste link survives: <a class="moz-txt-link-freetext" href="http://pastebin.com/3zXsTrem">http://pastebin.com/3zXsTrem</a><br>
<br>
It sets up 4 Tests:<br>
i_like_company<br>
i_like_company_too<br>
i_have_dependencies (depends on "i_want_to_be_alone)<br>
i_want_to_be_alone (required to run serial)<br>
<br>
Each test consumes 3 seconds.<br>
<br>
With vanilla 2.8.12 a parallel test run (e.g. ctest -j16) gives me:<br>
<blockquote>Test project /home/ngladitz/src/test/build<br>
Start 1: i_like_company<br>
Start 4: i_want_to_be_alone<br>
Start 2: i_like_company_too<br>
1/4 Test #1: i_like_company ................... Passed 3.01
sec<br>
2/4 Test #4: i_want_to_be_alone ............... Passed 3.01
sec<br>
3/4 Test #2: i_like_company_too ............... Passed 3.01
sec<br>
Start 3: i_have_dependencies<br>
4/4 Test #3: i_have_dependencies .............. Passed 3.02
sec<br>
<br>
100% tests passed, 0 tests failed out of 4<br>
<br>
Total Test time (real) = 6.05 sec<br>
</blockquote>
Note how the serial test "i_want_to_be_alone" starts and ends
roughly at the same time as "i_like_company" and
"i_like_comany_too".<br>
<br>
With my branch I get:<br>
<blockquote>Test project /home/ngladitz/src/test/build<br>
Start 1: i_like_company<br>
Start 2: i_like_company_too<br>
1/4 Test #1: i_like_company ................... Passed 3.02
sec<br>
2/4 Test #2: i_like_company_too ............... Passed 3.02
sec<br>
Start 4: i_want_to_be_alone<br>
3/4 Test #4: i_want_to_be_alone ............... Passed 3.03
sec<br>
Start 3: i_have_dependencies<br>
4/4 Test #3: i_have_dependencies .............. Passed 3.02
sec<br>
<br>
100% tests passed, 0 tests failed out of 4<br>
<br>
Total Test time (real) = 9.08 sec<br>
<br>
</blockquote>
Note how the whole test run takes 9 rather than 6 seconds.<br>
<br>
The test runs with vanilla are sporadic and sometimes give the
correct results consistently for a while which makes this difficult
to test consistently.<br>
<br>
I am grateful for any guidance and insight you may provide.<br>
<br>
Thanks in advance.<br>
<br>
Nils<br>
</body>
</html>