[CMake] Strange problem with build running twice from ctest script on Windows

Martin Apel martin.apel at simpack.de
Mon Aug 24 08:11:15 EDT 2009


Hi all,

I am experiencing a very strange problem with a build run via a ctest
script on Windows. The script looks as follows:

SET (CTEST_SOURCE_DIRECTORY "C:/s_9XXX_build-windows-32/develop")
SET (CTEST_PROJECT_NAME "Spck NA")
SITE_NAME(CTEST_SITE)
SET(CTEST_BUILD_NAME win32-plain-Experimental)
SET (CTEST_BINARY_DIRECTORY "C:/s_9XXX_build-windows-32/obj/plain32")
SET (CTEST_TEST_TIMEOUT 3600)
SET (CTEST_BUILD_COMMAND "nmake -i world")
SET (CTEST_CONFIGURE_COMMAND
"C:/s_9XXX_build-windows-32/develop/extern/win32/cmake-2.6/bin/cmake
-DCMAKE_BUILD_TYPE=Debug -G \"NMake Makefiles\" ${CTEST_SOURCE_DIRECTORY}")
ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
ctest_start(Experimental)
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_submit()

The result of running this via 'ctest --debug -VV -S' is, that the build
and test is carried out twice. After the first submission to CDash the
following error message appears in the log output generated by ctest:
  C:\ma\cmake\cmake-2.6.4\Source\CTest\cmCTestScriptHandler.cxx:411
Error in read script:
E:/simbuild/s_9XXX_build-windows-32/new_arch.Nightly.32.opt.ctest

Some of the tests invoked during the test step are failing, but I
expect, that ctest should not run the script twice, if any of the tests
are failing.
Afterwards the build is started all over, after the second run the same
message appears, but the ctest invocation terminates. On Linux the same
script works correctly without any errors.

I played around a bit and found out, that by removing the line
containing 'ctest_test' in the above script, the script would only be
run once without errors.
I also tried running the script in a separate process, using 'ctest -SP'
instead of 'ctest -S'. This also leads to a build running once only. For
me this means, that it works now using 'ctest -SP',  but to me it looks
like a bug in CTest.

Regards,

Martin





More information about the CMake mailing list