View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015431CMakeCTestpublic2015-03-05 10:082016-06-10 14:21
Reporterhansmi 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015431: Skipped tests (SKIP_RETURN_CODE) cause non-zero exit code
DescriptionIssue 0008466 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 ReproduceAdd 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 #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
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0013825closedKitware Robot ctest shouldn't report skipped tests as failed 

  Notes
(0040490)
Elias Pipping (reporter)
2016-02-15 06:50

This looks like a duplicate of bug 0013825 to me.
(0041250)
Kitware Robot (administrator)
2016-06-10 14:21

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.

 Issue History
Date Modified Username Field Change
2015-03-05 10:08 hansmi New Issue
2016-02-15 06:50 Elias Pipping Note Added: 0040490
2016-02-16 10:32 Brad King Relationship added duplicate of 0013825
2016-02-16 10:32 Brad King Status new => resolved
2016-02-16 10:32 Brad King Resolution open => duplicate
2016-06-10 14:21 Kitware Robot Note Added: 0041250
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team