ctest Questions
5
Solved
The top-level CMakeLists.txt contains:
include(CTest)
add_subdirectory(lib)
add_subdirectory(demo)
add_subdirectory(test)
lib/CMakeLists.txt is essentially:
add_library(MyLib <sources>)
...
Ratiocination asked 17/12, 2019 at 15:1
1
I want to use code coverage tools(lcov) in my cmake project.
I read the example here https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
The tests are added in my project using th...
4
I am building and running unit tests built with googletest inside a cmake project with ctest enabled
I run the tests with "ctest -VV"
but the test output does not color the "red" and "green"
[ ...
Recuperate asked 13/12, 2015 at 16:45
4
I am using gtest to write unit tests for my application. I also have ctest that runs all executables added by add_test CMake command. Is it possible to pass gtest variables through ctest when test ...
Quickstep asked 31/10, 2017 at 12:25
2
Solved
With CMake I try to execute a simple test using CTest. I have this configuration all in one directory (${CMAKE_SOURCE_DIR}):
~$ cat hello.cpp
#include <iostream>
int main() {
std::cout <...
4
I'm using CTest and want to pass command-line arguments to the underlying tests at runtime. I know there are ways to hard code command-line arguments into the CMake/CTest script, but I want to spec...
Faience asked 2/3, 2015 at 14:44
2
Solved
I have two cmake unit-test to check url and json helper classes, declared in the CMakeLists.txt of my project like following:
########################################
# CMakeLists.txt - Tests #
###...
Ergonomics asked 2/5, 2023 at 22:8
3
Solved
Sometimes it's good to check that certain things fail to build, e.g.:
// Next line should fail to compile: can't convert const iterator to iterator.
my_new_container_type::iterator it = my_new_con...
Eternal asked 10/5, 2015 at 19:14
2
Solved
I'd like to disable a set of tests by default, but be able to run them when explicitly targeted.
E.g. suppose I have a project with lots of fast-running unit tests that have been added via a add_t...
12
Solved
I'm using CMake to build my project. I have added a unit test binary which is using the Boost unit testing framework. This one binary contains all of the unit tests. I've added that binary to be ru...
4
Solved
I'm using CMake and CTest in CLion. Annoyingly, CTest generates a load of targets that I don't care about:
Continuous
ContinuousBuild
ContinuousConfigure
ContinuousCoverage
ContinuousMemCheck
Con...
2
Is there a way to report the results in a JUnit XML format with CTest?
I have found the the --output-junit comand-line switch but running ctest --output-junit testRes.xml does not create output fil...
Betroth asked 14/9, 2021 at 10:19
3
Solved
It seems like this should be easy to integrate CMake+CTest in jenkins. The cmakebuilder plugin is extremely easy to configure (just set the source tree and the build tree, done!). However I fail to...
2
Solved
Calling
ctest -j4 -DCTEST_MEMORYCHECK_COMMAND="/usr/bin/valgrind" -DMemoryCheckCommand="/usr/bin/valgrind" --output-on-failure -T MemCheck
says
Memory checker (MemoryCheckCommand) not set, or ...
11
Solved
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...
Caleb asked 9/4, 2009 at 9:22
2
Solved
3
Solved
I wanted to integrate ctest to a c++/c project. I use google tests to write unit tests.
Relevant part of my CMakeLists.txt looks like this:
...
####### CREATING EXE #######
add_executable(test_ex...
Fortunetelling asked 15/5, 2017 at 14:24
4
Solved
I have a C++ project using CMake. The project is built on CentOS machine. I have configured CLion to build remotely from MacOS. I have unit tests for the project and I am trying to run them from CL...
Tambour asked 26/9, 2019 at 20:0
1
I have set up CDash on my local machine and I'm using CTest to upload testing results to CDash - generating .gcov-files containing Branch Coverage info and packing them into gcov.tar beforehand (th...
Aristocrat asked 7/9, 2016 at 16:12
4
Solved
I have a c++ project which includes libevent library. Project structure:
.
|_ CMakeLists.txt
|_ Makefile
|_ src
| |_ my_lib.cpp
|_ test
| |_ my_lib_test.cpp
|_ lib
|_ libevent
|_ CMakeLists.txt
...
2
Solved
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 c...
2
Solved
I want ctest to show me the failed tests output by default. That is, I want to run:
$ make all test
and see any output of failed tests without having to cat Testing/Temporary/LastTest.log.
It a...
Schramke asked 22/4, 2013 at 22:54
1
Solved
Here is my project hierarchy
ProjectMain
|
Project 1
| |
| tests
|
Project 2
|
tests
CMakeLists of ProjectMain downloads and sets up google test as per https://github.com/google/googlete...
Aflame asked 4/6, 2020 at 2:49
2
I'm tasked with building python bindings for a c++-based project (using swig). The project uses cmake to build and ctest to test and the build and test of the bindings are supposed to be integrated...
2
I want to use ctest to run my tests with valgrind.
Thus I have written the following in my cmake file:
include(CTest)
find_program(MEMORYCHECK_COMMAND valgrind)
set(MEMORYCHECK_COMMAND_OPTIONS "-...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.