View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011774 | CMake | CTest | public | 2011-01-28 11:14 | 2016-06-10 14:31 | ||||
Reporter | tyler | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | All | OS | OS Version | ||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011774: ctest_test causes an error when no tests are found | ||||||||
Description | Reported here: http://www.mail-archive.com/cmake@cmake.org/msg34218.html [^] David Cole replied here, agreeing that this is a bug: http://www.mail-archive.com/cmake@cmake.org/msg34227.html [^] "I think it would be a good idea to make ctest_test not induce an error just because there are no tests to run." David also suggested some other useful enhancements to ctest_test()'s behavior, but I don't want to bury this bug under a ton of feature requests. | ||||||||
Steps To Reproduce | 1. Run a ctest -S script to build a project that doesn't include tests added via add_test(). 2. Upon reaching the ctest_test() command in the ctest script, ctest will report: Test project /satsop/build/kitt-cmake-based-addons-for-legacy-trunk/binary/addons/trunk/linux64.26/release Constructing a list of tests Done constructing a list of tests Checking test dependency graph... No tests were found!!! and upon reaching the end of the script, it exits with an error: Error in read script: /satsop/build/kitt-cmake-based-addons-for-legacy-trunk/kitt.cmake | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0027958) Derek Bruening (reporter) 2011-12-13 16:06 |
This bug is preventing our project from using the exit code of ctest to detect failures. We use ctest suites to build multiple builds. For some builds we run tests; for others we just ensure it builds, depending on the suite. Whenever we have a build with no tests, we hit this bug. Should be an easy fix: just change the cmCTestLog() on zero tests from ERROR_MESSAGE to WARNING like so: diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 9b12393..1bfcac2 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -573,7 +573,7 @@ int cmCTestTestHandler::ProcessHandler() { if ( !this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels() ) { - cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!" + cmCTestLog(this->CTest, WARNING, "No tests were found!!!" << std::endl); } } |
(0030600) David Cole (manager) 2012-08-13 15:12 |
Sending old, not-recently-updated issues to the backlog. (The age of the bug alone means that nobody is actively working on it...) If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^] It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing. |
(0041791) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-01-28 11:14 | tyler | New Issue | |
2011-01-28 11:28 | David Cole | Assigned To | => David Cole |
2011-01-28 11:28 | David Cole | Status | new => assigned |
2011-12-13 16:06 | Derek Bruening | Note Added: 0027958 | |
2012-08-13 15:12 | David Cole | Status | assigned => backlog |
2012-08-13 15:12 | David Cole | Note Added: 0030600 | |
2012-08-13 15:20 | David Cole | Assigned To | David Cole => |
2016-06-10 14:28 | Kitware Robot | Note Added: 0041791 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |