Questions tagged [ctest]

Is the CMake test driver program.

Is the CMake test driver program. Many CMake command related to testing are related to CTest, too.

Most of the documentation is part of CMake's documentation, like the documentation concerning the CTest executable.

298 questions
0
votes
0 answers

Running CTest after project has completed

I currently have a rather large codebase that builds a number of applications each as their own seperate projects underneath one global project. I want to be able to run CTest on this global project as part of the regular build, so if a user tries…
0
votes
1 answer

In CTest, why is the variable argument to my function not set?

I have a CTestList.cmake file containing this function definition and call: function(add_test_r testname ) add_test( ${testname} python executeRegressionTestCase.py ${testname} ) endfunction(add_test_r) add_test_r(Test01) I need to support…
raf
  • 535
  • 4
  • 18
0
votes
0 answers

How to generate coverage report from ctest in python?

I have a python script "sample.py" which is executing few ctest. I want to have a coverage report generated once ctest are executed. The coverage report should be named as "test.cov". I looked around and found "pytest-cov" could be helpful but…
stack learner
  • 33
  • 2
  • 9
0
votes
1 answer

Where is the coredump file located in CTest framework?

I am getting segmentation fault when I am running unit test in CTest Framework. So I need the core dump file for seg fault. But not able to locate it.
0
votes
1 answer

cmake generate test data

my tests require some data files to be present before they can run. The files are huge so I would not like to commit them into my VCS but instead generate them on demand using a script. But generating the files also takes a lot of time, so I'd like…
josch
  • 6,716
  • 3
  • 41
  • 49
0
votes
2 answers

Link more than one file to executable

How can I link more than one file(test) to an executable? I have this code: set(TEST_EXE_NAME Test) add_executable(${TEST_EXE_NAME} t1.cc) add_executable(${TEST_EXE_NAME} t2.cc) add_test(Test ${TEST_EXE_NAME}) This of course doesn't compile and I…
user6683825
0
votes
2 answers

How can I test through CTest if an SQLite table exists and get the response?

This is my main code: sqlite3 *db; sqlite3_stmt * stmt; string sqlstatement = "CREATE TABLE IF NOT EXISTS accounts (account_id integer primary key, balance integer not null)"; if (sqlite3_open("test.db", &db) == SQLITE_OK) { …
user6683825
0
votes
1 answer

Is it possible too use Opencover with CTest?

I am new using Opencover and I would like to know if it is possible to use it with CMake tests because my project is already using it. mkdir build cd build cmake .. cmake --build . --config…
ABotella
  • 83
  • 1
  • 7
0
votes
0 answers

How can I keep ctest from deleting my tests on failure?

I have a CMakeLists.txt in my test folder and it looks like this: include(CTest) enable_testing() if (CMAKE_VERSION VERSION_LESS 3.2) set(UPDATE_DISCONNECTED_IF_AVAILABLE "") else() set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
0
votes
1 answer

How to change Clion build directory

I am learning to use CLion IDE these days. I am trying to change the default path of build directory: ~/.CLion2016.2/system/cmake/generated/AFQMCLIB-83788a76/83788a76/Debug I can change by: Go to build execution deployment Click cmake Change…
Hao Shi
  • 503
  • 4
  • 16
0
votes
1 answer

Linking runtime library for test with cmake

Is there any simple way to link at runtime a locally built library to a test with CMAKE? For example: enable_testing() add_executable(Test test/Test.cpp) target_link_libraries(Test -L../lib/libzmq/build/lib/ zmq) add_test( NAME TestClientZmq …
paul-g
  • 3,797
  • 2
  • 21
  • 36
0
votes
1 answer

Cmake ctest generation

i am using CMake together with ctest to generate software tests. As an example i have a binary foo which get's exactly three input arguments p1 , p2, p3. The Parameters can range from 0-2. To check my binary foo with all possible combination of…
user2438196
0
votes
0 answers

How to set CTEST_SOURCE_DIRECTORY

I am trying to setup CTest to run a coverage analysis. It seems like I have to make a MyScript.cmake file and call it with ctest -S MyScript.cmake. I thought a simple example might look like this: ctest_start(TestCoverage) ctest_coverage(BUILD…
David Doria
  • 9,873
  • 17
  • 85
  • 147
0
votes
1 answer

CMake : Executable crashes when running ctest

I am configuring CMake build project on Windows for MSVC++ project.It build ok the executable,then installs it into a defined directory.In my cases that's: ${CMAKE_SOURCE_DIR}/x64/${CMAKE_BUILD_TYPE}/ The executable has got a folder in the same…
Michael IV
  • 11,016
  • 12
  • 92
  • 223
0
votes
1 answer

cross-platform numerical testing?

I need to test numerical software that runs on both Linux and Windows. The tests involve comparing outputs to known-good outputs, etc., similar to what is described at Numerical regression testing. To clarify, the outputs are not necessarily…
theTrickster
  • 99
  • 1
  • 8
1 2 3
19
20