<HTML dir=ltr><HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19393"></HEAD>
<BODY>
<DIV><FONT color=#000000 size=2 face=Arial>Hello</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have finally the simplest setup which reproduces random BAD_COMMAND errors:</FONT></DIV>
<DIV><FONT size=2 face=Arial>- no compilations or produced binaries, justs tests</FONT></DIV>
<DIV><FONT size=2 face=Arial>- tests are called without arguments or set properties</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>There are 20 tests, all of the form </FONT></DIV>
<DIV><FONT size=2 face=Arial> add_test (test_02 ${CMAKE_CURRENT_SOURCE_DIR}/test_driver)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV>
<DIV><FONT size=2 face=Arial>All tests call the same trivial test driver, with grep called as a sub-process:</FONT></DIV>
<DIV><FONT size=2 face=Arial>-------------</FONT></DIV>
<DIV>#!/bin/sh</DIV>
<DIV>SRCDIR="../../test"</DIV>
<DIV>########################################<BR># Run simple grep command<BR>grep dummy ${SRCDIR}/CMakeLists.txt</DIV>
<DIV>exit 0<BR>
<DIV><FONT size=2 face=Arial>-------------</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>The project files are provided as attachment. I ran the following commands from the buid directory:</FONT></DIV>
<DIV><FONT size=2 face=Arial>cmake ../test</FONT></DIV>
<DIV><FONT size=2 face=Arial>make</FONT></DIV>
<DIV><FONT size=2 face=Arial>make test</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Running make test over and over produces randomly (average of about 1 test over 20) some lines of the form</FONT></DIV>
<DIV>16/20 Test #16: test_16 ..........................***Not Run 0.44 sec<BR> Start 17: test_17</DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>The test finally being reported as failed, when there is no reason for that.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>If the driver is further simplified by removing the grep command, no test fails.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></DIV>
<DIV><FONT size=2 face=Arial>Computer: : Intel Core 2 Duo CPU E7500 @ 2.93GHz</FONT></DIV>
<DIV><FONT size=2 face=Arial>System: : Windows XP Professional Version 2002 SP 3</FONT></DIV>
<DIV><FONT size=2 face=Arial>Cygwin version: CYGWIN_NT-5.1 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin</FONT></DIV>
<DIV><FONT size=2 face=Arial>cmake version: 2.8.10.2</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>My conclusion is that there is a process management problem with ctest. As a consequence, this version of cmake can't be used for tests involving any sub-process.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Can this be submitted as a bug report ? If so, what is the procedure ?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>André Bilodeau</FONT></DIV></DIV></BODY></HTML>