[CMake] Skip(ped) test with CTest?
David Cole
david.cole at kitware.com
Fri Jun 8 11:13:14 EDT 2012
On Fri, Jun 8, 2012 at 10:47 AM, Christoph Grüninger <
christoph.grueninger at iws.uni-stuttgart.de> wrote:
> Hi CMake,
> can I skip a test with CTest? Currently I do not add a test which is
> dependent on a not found feature, like:
>
> if(feature_found)
> add_test(..)
> endif(feature_found)
>
> If all tests pass, I still don't know whether everything is fine, because
> the not added tests are not shown.
>
> Has CMake the possibility to mark tests "to skip".
> Or the other way round, if my test detects that the feature is not
> available it exits with status code not zero, let's say 77. And CMake does
> not throw an error but marks the test neither as passed nor failed, but as
> skipped.
>
> If this is not possible, would it be worth to write a feature request in
> the CMake bug tracker?
>
> Bye
> Christoph
>
> --
> People who are more than casually interested in computers should have
> at least some idea of what the underlying hardware is like. Otherwise
> the programs they write will be pretty weird. -- Donald Knuth
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>
This has been requested before:
http://public.kitware.com/Bug/view.php?id=8466
It's in the backlog, would require changes to both ctest and cdash, and I'm
not enthusiastic about it. Perhaps I just need convincing that it's a good
idea. For now, there are no plans to implement anything like this, and I
would recommend that you use a wrapper script approach, printing out
"skipped" and returning success when you don't actually run your test.
HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120608/02484a84/attachment.htm>
More information about the CMake
mailing list