ctest: One timeout causes all following tests to timeout aswell

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ctest: One timeout causes all following tests to timeout aswell

Timo Reichl
I'm experiencing a weird issue using Debian 8.5 & CMake/CTest 3.6.1. The configure step does the following:
- Create target alias 'tests' for the CMake target 'test'
- Compile each test
- Run each test using --force-new-ctest-process  **
Now, to be exact, I'm using CppUnit as my testing framework and I'm developing for an ARM-based embedded system. I want the tests to run both on my host machine and on the target hardware - using the same test classes and source files.
On my host machine there is no problem whatsoever. Tests take about 1 second or less to run and succeed.
To run them on the target hardware I'm using Rowley's Crossworks Studio 3.7.5 which brings command-line utilities to build (CrossBuild), flash & run (CrossLoad) the target hardware. I'm not sure whether the issue stems from CMake or CrossLoad, or both.
To integrate this on CMake I just call CrossBuild before running CTest, and then CTest runs CrossLoad and waits for its exit code. This works completely fine until that one test (about 20 tests in) where CTest waits forever for an exit code (~25 mins, default timeout) and finally says that the test has timed out. The weird thing is, this happens to every next test. And it's not the test's fault. If I run the test myself using CTest at the command-line, it runs through in about 6 seconds or so. If I exclude the test which times out first, the test next in line is the first to time out.
** Could --force-new-ctest-process be the problem, or at least be involved in causing the problem?
So I have two questions:
1) What does CMake do when it thinks that the test executable has timed out? Does it kill the process or are there some other steps involved? If so, which?
2) Why does that happen to all the following tests?
Is this a common issue or has it been encountered before? I couldn't find anything on Google.
Thanks a bunch!


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: