Philosophy with Tests for Beginners

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

Philosophy with Tests for Beginners

Jörg Kreuzberger

I have a question regarding handling with tests.
currently my sources are build together with tests. the tests in the binary location could be executed via make test or ctest. So far so good.

Considering our Jenkins / Build Configurations i want to seperate build and tests. That means i want to build the tests with JOB A and execute them on JOB B.
So i have to bring the tests from A to B.
This could i do if i e.g. install the tests (adding install command in CMakeLists) and execute them and find them via scripts.

Is there another solution (e.g. undocumented CMAKE_PACKAGE_TEST ) or another approach that solves my problem in a way that i can use e.g. ctest in the other jobs too?

Other questions is about handling "extra files". So i have for example a test which relies on a test file. Currently i copy it as PRE_BUILD step into the tests binary dir, so it is available on test execution. Is there a better approach without using an install step?


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: