[CMake] random BAD_COMMAND error on ctest

Eric Noulard eric.noulard at gmail.com
Wed Jan 16 07:47:39 EST 2013


2013/1/16 BILODEAU Andre <andre.bilodeau at safran-engineering.com>:
> Hello
>
> I have finally the simplest setup which reproduces random BAD_COMMAND
> errors:
> - no compilations or produced binaries, justs tests
> - tests are called without arguments or set properties
>
> There are 20 tests, all of the form
>     add_test (test_02 ${CMAKE_CURRENT_SOURCE_DIR}/test_driver)
>
> All tests call the same trivial test driver, with grep called as a
> sub-process:
> -------------
> #!/bin/sh
> SRCDIR="../../test"
> ########################################
> # Run simple grep command
> grep dummy ${SRCDIR}/CMakeLists.txt
> exit 0
> -------------
>
> The project files are provided as attachment. I ran the following commands
> from the buid directory:
> cmake ../test
> make
> make test
>
> Running make test over and over produces randomly (average of about 1 test
> over 20) some lines of the form
> 16/20 Test #16: test_16 ..........................***Not Run   0.44 sec
>       Start 17: test_17
>
> The test finally being reported as failed, when there is no reason for that.
>
> If the driver is further simplified by removing the grep command, no test
> fails.
>
> Computer:       : Intel Core 2 Duo CPU E7500 @ 2.93GHz
> System:         : Windows XP Professional Version 2002 SP 3
> Cygwin version: CYGWIN_NT-5.1 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
> cmake version:  2.8.10.2
>
> 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.
>
> Can this be submitted as a bug report ? If so, what is the procedure ?

Yes it should.
Go there:
http://public.kitware.com/Bug/bug_report_page.php

and fill-in the form.
Then attach the zip file to your bug report.

You can even reply to this thread by simply giving the URL of
the bug in order to ease connecting the dots.

You can add yourself as "monitoring" the bug so that you'll get
follow-up from mantis.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list