<div class="gmail_quote">On Fri, Jun 8, 2012 at 10:47 AM, Christoph Grüninger <span dir="ltr"><<a href="mailto:christoph.grueninger@iws.uni-stuttgart.de" target="_blank">christoph.grueninger@iws.uni-stuttgart.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi CMake,<br>
can I skip a test with CTest? Currently I do not add a test which is dependent on a not found feature, like:<br>
<br>
if(feature_found)<br>
add_test(..)<br>
endif(feature_found)<br>
<br>
If all tests pass, I still don't know whether everything is fine, because the not added tests are not shown.<br>
<br>
Has CMake the possibility to mark tests "to skip".<br>
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.<br>
<br>
If this is not possible, would it be worth to write a feature request in the CMake bug tracker?<br>
<br>
Bye<br>
Christoph<br>
<br>
-- <br>
People who are more than casually interested in computers should have<br>
at least some idea of what the underlying hardware is like. Otherwise<br>
the programs they write will be pretty weird. -- Donald Knuth<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br><div><br></div><div>This has been requested before:</div><div><br></div><div> <a href="http://public.kitware.com/Bug/view.php?id=8466">http://public.kitware.com/Bug/view.php?id=8466</a></div><div>
<br></div><div>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.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div>