[CMake] Random BAD_COMMAND error when running CTest

Ian Mackenzie ian.e.mackenzie at gmail.com
Fri Oct 17 20:27:21 EDT 2008


I'm getting a strange, random error when running CTest...I've searched
all over and haven't been able to find anybody else with the same
problem.  When I run a bunch of tests, some or all of them frequently
fail with a BAD_COMMAND error message.  For instance, running ctest
just now gave me

---------------------------------------------------------------------------------

Start processing tests
Test project /home/ian/projects/opensolid/build
  1/  3 Testing scalar_value_tests            ***Bad command 1
  2/  3 Testing vector_value_tests               Passed
  3/  3 Testing lua_tests                        Passed

67% tests passed, 1 tests failed out of 3

The following tests FAILED:
          1 - scalar_value_tests (BAD_COMMAND)
Errors while running CTest

---------------------------------------------------------------------------------

then running ctest -VV (without changing anything in between) resulted in

---------------------------------------------------------------------------------

UpdateCTestConfiguration  from
:/home/ian/projects/opensolid/build/DartConfiguration.tcl
Start processing tests
UpdateCTestConfiguration  from
:/home/ian/projects/opensolid/build/DartConfiguration.tcl
Test project /home/ian/projects/opensolid/build
Constructing a list of tests
Done constructing a list of tests
Changing directory into /home/ian/projects/opensolid/build/src/kernel
  1/  3 Testing scalar_value_tests
Test command: /home/ian/projects/opensolid/build/bin/scalar_value_tests
Test timeout computed to be: 9.99988e+06
Running 7 tests
--- testMpfrConversion ---
--- testScalarValue ---
--- testNegation ---
--- testAddition ---
--- testSubtraction ---
--- testFunctions ---
--- testSine ---
OK!
-- Process completed

*** ERROR executing: Invalid argument
***Bad command 1
  2/  3 Testing vector_value_tests
Test command: /home/ian/projects/opensolid/build/bin/vector_value_tests
Test timeout computed to be: 9.99988e+06
Running 3 tests
--- testVectorArithmetic ---
--- testDotProduct ---
--- testCrossProduct ---
OK!
-- Process completed
   Passed
Changing directory into /home/ian/projects/opensolid/build/src/lua
  3/  3 Testing lua_tests
Test command: /home/ian/projects/opensolid/build/bin/lua_tests
Test timeout computed to be: 9.99988e+06
Running 1 test
--- testSimple ---
Error message: [string "return 1 + 'cat'"]:1: attempt to perform
arithmetic on a string value
OK!
-- Process completed

*** ERROR executing: Invalid argument
***Bad command 1

33% tests passed, 2 tests failed out of 3

The following tests FAILED:
          1 - scalar_value_tests (BAD_COMMAND)
          3 - lua_tests (BAD_COMMAND)
Errors while running CTest

---------------------------------------------------------------------------------

and running ctest a third time gives

---------------------------------------------------------------------------------

Start processing tests
Test project /home/ian/projects/opensolid/build
  1/  3 Testing scalar_value_tests               Passed
  2/  3 Testing vector_value_tests               Passed
  3/  3 Testing lua_tests                        Passed

100% tests passed, 0 tests failed out of 3

---------------------------------------------------------------------------------

Each individual test executable runs fine, and none of them include
any randomness (e.g. generating random numbers as inputs to tests,
which could conceivably cause some weird erratic crashes).  I'm using
CMake 2.6.2 on Arch Linux i686.  Any ideas what might be wrong, or
where I should look for clues?  Thanks!

-Ian Mackenzie


More information about the CMake mailing list