Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

How to check that a program fails with message [duplicate]

I am writing a command-line utility that when given invalid args should print an error message and return with non-zero exit code. I want to write a test that checks this behaviour. The details of ...
Krzysiek Karbowiak's user avatar
0 votes
0 answers
25 views

CTests: Cannot create directory /Testing/Temporary

I'm modifying some old ctests scripts to use git instead of svn, and refactoring them a bit. When I run them, I get Initial checkout failed! when running in verbose mode the only error I can find is ...
cauchi's user avatar
  • 1,543
0 votes
0 answers
21 views

ctest vs jenkins / bamboo

I'm trying to understand the differences between ctest and Bamboo/Jenkins. I'm a passive user of Bamboo meaning I'm not the one developing on Bamboo, only viewing test results etc. My understanding of ...
ST Renegade's user avatar
0 votes
1 answer
93 views

Adding a prefix command to all ctest executions

I am following the instructions to use the mutation testing framework Mull and integrating it with CMake https://mull.readthedocs.io/en/latest/tutorials/CMakeIntegration.html The last step involves ...
alfC's user avatar
  • 16.4k
2 votes
0 answers
641 views

VsCode's cmake plugin display "[ctest] Folder is not found in Test Explorer"

On vscode(v1.85.1), I installed the extensions CMake(v0.0.17) and CMake Tools(v17.7). I use Windows system, and use vscode to open cmake projects of WSL and remote Linux. When using vscode to ...
orz's user avatar
  • 21
2 votes
1 answer
210 views

Customize CTest properties and labels based on test names

I am discovering gtest tests using gtest_discover_tests(...) I then want to set certain properties and labels based on the test names. (I have done this before several years ago so I know it's ...
Zitrax's user avatar
  • 20.5k
1 vote
1 answer
100 views

Redirect stdout in unit testing with ctest

Writing unit test with ctest. The function to test is doing printout to stdout/stderr. So, right now, I am having: typedef struct { char *stdout_file; char *stderr_file; } test_config; static int ...
White Owl's user avatar
  • 1,200
0 votes
1 answer
300 views

CMake Tools runs build before running ctest, but I don't want it to / think it doesn't need to

cmake.buildBeforeRun is not working as expected. I have CMake project with a custom CMake Preset for different builds, Our Unit test are doctest based which we add in ctest using "...
Shivam Kumar's user avatar
0 votes
1 answer
64 views

--trace-children-skip option is not having any impact with Valgrind

I have a run.sh with: ./opt/exm/bin/exm_daemon exm_daemon spawns many process. I run valgrind with options: sudo valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=...
noob-sys-dev's user avatar
0 votes
0 answers
17 views

CTest: Resources for Fixtures?

I want to be able to run a bunch of tests against databases in parallel. For this, I use a docker postgres image that I can deploy in containers that are mapped to ports 5432+n where 0 <= n <=16....
MKasperczyk's user avatar
1 vote
0 answers
313 views

Why does CTest output a junit xml in googletest format or why does Jenkins plugin XUnit think that it is?

I am building a jenkins pipeline job from scratch. Once the product is built, I run the unit tests on it via CTest. The XUnit Jenkins plugin requires a JUint xml file to report the tests on the build ...
MarkbCodes's user avatar
0 votes
0 answers
19 views

Test and compiler output

I would like to capture the output of CMake testing. Using Xcode, one can find a file named LastTest which includes most of what I want. But it seems to not include build/link failures. If a test ...
Robert Ramey's user avatar
  • 1,164
0 votes
0 answers
137 views

How to pass --gtest_filter to ctest

I am migrating one of my test folders to gtest, it includes multiple files each having its own test Fixture. So far, my -simplified- cmake is : file(GLOB SOURCES *.c) set(EXECUTABLE_NAME "mytest&...
rahman's user avatar
  • 4,948
1 vote
1 answer
1k views

CTest: Test not available without configuration

I realize this is a very basic question, but I was unable to fix my problem despite even after reading multiple tutorials, including the official tutorial and the Professional Cmake book. I am simply ...
Mat's user avatar
  • 1,026
1 vote
1 answer
128 views

Why isn't WORKING_DIRECTORY being used in my cmake tests?

I'm trying to set the working directory for a CMake test, but I can't seem to get it to work. Here's the really simple test I'm trying to use: CMakeLists.txt cmake_minimum_required(VERSION 3.24) set (...
Joshua Maiche's user avatar

15 30 50 per page
1
2 3 4 5
21