[cmake-developers] [CMake 0014829]: DEPENDS: Specifies that this test should only be run after the specified list of tests.
Mantis Bug Tracker
mantis at public.kitware.com
Mon Mar 24 12:31:16 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://cmake.org/Bug/view.php?id=14829
======================================================================
Reported By: Mathieu Malaterre
Assigned To:
======================================================================
Project: CMake
Issue ID: 14829
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-03-24 12:31 EDT
Last Modified: 2014-03-24 12:31 EDT
======================================================================
Summary: DEPENDS: Specifies that this test should only be run
after the specified list of tests.
Description:
ctest documentation defines:
"DEPENDS: Set this to a list of tests that must finish before this test is run."
However it should read as
"DEPENDS: Set this to a list of tests that must execute before this test is
run."
Steps to Reproduce:
Steps:
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(timeout NONE)
enable_testing()
# timeout
add_test(NAME dummy1 COMMAND sleep 10)
set_tests_properties(dummy1 PROPERTIES TIMEOUT 4)
add_test(NAME dummy2 COMMAND echo "not ok !")
set_tests_properties(dummy2 PROPERTIES DEPENDS dummy1)
set_tests_properties(dummy2 PROPERTIES WILL_FAIL 1)
# failed test:
add_test(NAME dummy3 COMMAND ls /urs)
add_test(NAME dummy4 COMMAND echo "not ok !")
set_tests_properties(dummy4 PROPERTIES DEPENDS dummy3)
set_tests_properties(dummy4 PROPERTIES WILL_FAIL 1)
$ cmake . && make
$ make test
Running tests...
Test project /tmp/hh/timeout
Start 1: dummy1
1/4 Test http://cmake.org/Bug/view.php?id=1: dummy1
...........................***Timeout 4.00 sec
Start 2: dummy2
2/4 Test http://cmake.org/Bug/view.php?id=2: dummy2
...........................***Failed 0.00 sec
Start 3: dummy3
3/4 Test http://cmake.org/Bug/view.php?id=3: dummy3
...........................***Failed 0.00 sec
Start 4: dummy4
4/4 Test http://cmake.org/Bug/view.php?id=4: dummy4
...........................***Failed 0.00 sec
0% tests passed, 4 tests failed out of 4
Total Test time (real) = 4.01 sec
The following tests FAILED:
1 - dummy1 (Timeout)
2 - dummy2 (Failed)
3 - dummy3 (Failed)
4 - dummy4 (Failed)
Errors while running CTest
make: *** [test] Erreur 8
Additional Information:
It would make sense to have another property "DEPENDS_NOFAILURE" which would
execute a test only if none of the dependee tests failed (whether a test failure
or a timeout occur).
This will make sure that a test is not wrongly executed, but only if all tests
dependencies have executed and finished properly.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-03-24 12:31 Mathieu MalaterreNew Issue
======================================================================
More information about the cmake-developers
mailing list