The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15431 ====================================================================== Reported By: hansmi Assigned To: ====================================================================== Project: CMake Issue ID: 15431 Category: CTest Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2015-03-05 10:08 EST Last Modified: 2015-03-05 10:08 EST ====================================================================== Summary: Skipped tests (SKIP_RETURN_CODE) cause non-zero exit code Description: Issue http://public.kitware.com/Bug/view.php?id=8466 implemented a property named SKIP_RETURN_CODE for tests. It works as intended, but CTest's exit status is non-zero when one or more tests were skipped. CMake's support for CTest automatically generates a target which relies on the exit code of CTest to indicate success.
There should probably be a flag (and/or environment variable) to indicate that skipped tests are acceptable. Steps to Reproduce: Add a skipped test: add_test(NAME mytest COMMAND bash -c "exit 77") set_property(TEST mytest PROPERTY SKIP_RETURN_CODE 77) Then run “cmake --build . --target test”. At least with GNU make this causes a failure. 1/1 Test http://public.kitware.com/Bug/view.php?id=1: mytest ...............***Skipped 0.00 sec … The following tests FAILED: 1 - mytest (Not Run) Errors while running CTest Makefile:117: recipe for target 'test' failed make: *** [test] Error 8 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-03-05 10:08 hansmi New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
