ctest

CMake & CTest : make test doesn't build tests.

I'm trying CTest in CMake in order to automatically run some of my tests using make test target. The problem is CMake does not "understand" that the test I'm willing to run has to be built since it is part of the project. So I'm looking for a way to explicitly specify this dependency. ...

CMake and CTest question

In the test that I want to run using CTest I should be adding the test that I want to run, with the following command: add_test(TestName ExeName) problem is what if I want to supply an argument to the TestName, where do I put it? how do I run ctest individually without cmake in unix command line in this context? ...

CMake CTest prevent truncation of test name

Hi, I'm currently running CTest, but I have a problem whereby tests with long names. For example: "API Part1 : Some test information w/ this input file" get's truncated to something like "API Part1 : Some test information w/ th"). It seems like the test name is truncated to about 31 characters. How can I change this? Thanks ...

CTest with multiple commands.

I'm building some tests using CTest. Usually, I can set up the test by simply the line: ADD_TEST(Test_Name executable args) However, I've run into a problem, I have some tests that require two commands to be run in order for it to work, is there any way I can run two programs within a single ctest, or am I required to create a new te...

CMake and CTest: How to make target "Nightly" actually build the tests

It's a well known problem that executing make "test" doesn't build the tests as discussed here. As suggested, the problem can be partly solved with the artificial target "check". I want to know how I can force building of tests when i call "make Nightly". What I've done so far: add_custom_target(buildtests) add_custom_target(check ...

How to adapt my unit tests to cmake and ctest?

Until now, I've used an improvised unit testing procedure - basically a whole load of unit test programs run automatically by a batch file. Although a lot of these explicitly check their results, a lot more cheat - they dump out results to text files which are versioned. Any change in the test results gets flagged by subversion and I can...