View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005977CMakeCMakepublic2007-10-29 14:562016-06-10 14:30
Reportergoatboy160 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005977: Add VERBOSE_TESTING setting for make runs of CTest
DescriptionI'm only using the Visual Studio generator for running unit tests right now. We use boost::test for unit test, and we are just seeing Failed for the test case running during the build, so it would be extrememly nice to be able to add command line parameters to the rule in RUN_TESTS.
TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0011935closedStephen Kelly CTest with --output-on-failure option 

  Notes
(0009951)
Bill Hoffman (manager)
2007-12-17 12:08

How do you add parameters to the RUN_TEST target? If you run ctest from the command line with -V it will work. But, I don't think we want two RUN_TEST targets. What exactly are you suggesting?
(0022377)
goatboy160 (reporter)
2010-09-28 12:08

Inorder for us to get useful results we must run with the -V, thus rendering the RUN_TESTS target useless. our scripts run ctest manually now, but for devs it would be nice to be able to use the RUN_TESTS target, which unfortunately without the Verbose parameter provides no feedback on the failure and is thus useless.
(0022432)
Thomas Wiedemann (reporter)
2010-10-07 09:44
edited on: 2010-11-15 06:10

Hi, i would also appreciate a solution for this issue.
My test programs print the reason and location of failures, so when ctest executes them from a development environment like Visual Studio and -VV is (manually) added to ctest or the environment variable "CTEST_OUTPUT_ON_FAILURE" is set, we can easily jump to the location in the source code where the test failed, very comfortable.
The problem is, i can't control this behaviour from within cmake (can't set parameters for ctest, and can't set global environment variables).

So i'd suggest to add and evaluate the variable "CTEST_OUTPUT_ON_FAILURE" also from CTestCustom.cmake to print the output of failed tests. And, to make me really happy, it would be nice if i could specify CTEST_OUTPUT_ALL (new variable), to print _all_ test output :)

Currently, i specified a POST_TEST_STEP to just print Testing/Temporary/LastTest.log.tmp ... but i think this is really fragile...

(0036623)
Ela782 (reporter)
2014-08-16 16:54

Is there an update to this problem? I'm a bit surprised, I think it's quite a major issue for running unit tests with CMake and Visual Studio. It's quite useless if it doesn't show which test failed.

I just did a round of Google'ing and there doesn't seem a proper solution, only "hacks". It would be so simple - just let us somehow specify in CMake that we want to make the RUN_TESTS target run ctest with the -V argument.

People with the same problem (and some hack-solutions):
http://stackoverflow.com/questions/5709914/using-cmake-how-do-i-get-verbose-output-from-ctest [^]
http://www.cmake.org/pipermail/cmake/2007-August/016078.html [^]
http://www.cmake.org/pipermail/cmake/2005-December/007778.html [^]
(0039157)
Roman80 (reporter)
2015-07-20 03:28

As a workaround you could add the option "--output-on-failure" to the RUN_TESTS target.

.) Right click on the RUN_TESTS target
.) Select properties
.) Edit the "Command Line" parameters under "Configuration Properties - Build Events - Post-Build Event"

NOTE: This change is only temporary and are removed upon the next CMake configure run

Nevertheless it would be nice to add this "parameter" to the RUN_TESTS target and/or define a CMAKE VARIABLE where the user can decide to add it or not
(0041398)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2007-10-29 14:56 goatboy160 New Issue
2007-12-17 12:08 Bill Hoffman Note Added: 0009951
2007-12-17 12:08 Bill Hoffman Status new => assigned
2007-12-17 12:08 Bill Hoffman Assigned To => Bill Hoffman
2010-09-28 12:08 goatboy160 Note Added: 0022377
2010-10-07 09:44 Thomas Wiedemann Note Added: 0022432
2010-11-15 06:10 Thomas Wiedemann Note Edited: 0022432
2014-08-16 16:54 Ela782 Note Added: 0036623
2015-02-26 15:25 Stephen Kelly Relationship added has duplicate 0011935
2015-07-20 03:28 Roman80 Note Added: 0039157
2016-06-10 14:27 Kitware Robot Note Added: 0041398
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team