[CMake] [ctest] CTEST_CUSTOM_TESTS_IGNORE in CTestCustom.cmake ignored in script mode (ctest -S)
Maik Beckmann
beckmann.maik at googlemail.com
Wed Nov 11 13:57:05 EST 2009
Well well...
After I did this
{{{
--- Source/CTest/cmCTestTestHandler.cxx 25 Jun 2008 13:51:45 -0000 1.68.2.3
+++ Source/CTest/cmCTestTestHandler.cxx 11 Nov 2009 18:38:38 -0000
@@ -413,7 +413,7 @@
this->TestResults.clear();
- this->CustomTestsIgnore.clear();
+ //this->CustomTestsIgnore.clear();
this->StartTest = "";
this->EndTest = "";
}}}
.. ignoring tests via CTEST_CUSTOM_MEMCHECK_IGNORE in
${CMAKE_BINARY_DIR}/CTestCustom.cmake worked fine, until I removed the
# before
#ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
The reason: ctest starts and reads the binary dir, which is either
empty from the beginning, or was wiped by
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
So no CTestCustom.cmake to read for ctest, thus it doesn't work.
This issue is very similar to the issue of not being able to read
CTestConfig.cmake on a fresh checkout, which I worked around like
this:
{{{
# This can't be the right way:
if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set(_dont_submit on)
else()
set(_dont_submit off)
endif()
...
if(_dont_submit)
message(SEND_ERROR
"Due to an ugly bug in ctest, it cannot succeed on a clean checkouts. We won't"
" submit the results this time, but the next time you run this command.")
else()
ctest_submit()
endif()
}}}
I could work around the
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
vs
CTestCustom.cmake
by submitting the ctest_memcheck() results in two seperate ctest runs,
where the latter depends on the former and doesn't execute
ctest_empty_binary_directory.
However, this hole process is broken and I give it up it for now. I
look forward to try it again, once ctest got reworked.
Best,
-- Maik
PS: Still hoping one of you guys proves me wrong
More information about the CMake
mailing list