[cmake-developers] Test failing because Test directory is not clean

Clinton Stimpson clinton at elemtech.com
Tue Feb 22 23:00:26 EST 2011


On Feb 22, 2011, at 7:25 PM, David Cole wrote:

> On Tue, Feb 22, 2011 at 6:12 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
>> Hi All,
>> 
>> Some of my commit break some CPackComponent tests:
>> http://www.cdash.org/CDash/testDetails.php?test=84851095&build=874639
>> 
>> Those test are OK locallly on my host.
>> I think it fails because the test directory wasn't cleaned before
>> re-running the test.
>> 
>> How do I ensure that a test directory is cleaned before running a test?
> 
> You do not. On Continuous dashboards, the directories are not cleaned
> before running the tests. Why does it need to be cleaned?
> 
> On all of the nightly ones, the vast majority should be clean build/test cycles.
> 

I've having problems with these tests too.
If they fail once, they will keep failing until some files generated by the failed test are cleaned up.

Seems to me that an extra cleanup step should be done before or during the 
"ctest --build-and-test ...." for these tests that glob for generated files.

Could you do this with a ctest script that cleans the test specific build directory before doing the configure/build/test?  And call that ctest script in the add_test() call?

I'm not sure if this is a good idea, but what if the glob was done under the _CPack_Packages directory which cpack always cleans beforehand.

Clint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110222/92ca0f76/attachment.html>


More information about the cmake-developers mailing list