View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015619CMakeCTestpublic2015-06-16 18:412016-06-10 14:31
ReporterClinton Stimpson 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0015619: ctest stderr vs stdout
DescriptionI have a ctest script which basically has:
ctest_start()
...
ctest_build()
ctest_test()

I invoke that script with
ctest -V -S my.ctest 1>mytest.stdout 2>mytest.stderr

And I'm hoping that mytest.stderr will contain only errors in my script, not build or test errors from within ctest_build() and ctest_test().

However, errors like
Unable to find executable: /path/to/executable
from ctest_test() can leak into the mytest.stderr if there are build errors.

I don't think that is expected behavior.
Steps To ReproduceAll in the same directory:

=== CMakeLists.txt ===
include (CTest)
add_test(NAME MyTest COMMAND nonexist_executable)

=== my.ctest ===
set(CTEST_SOURCE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
set(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

ctest_start(Experimental)
ctest_test()

=== CTestConfig.cmake ===
<empty>


Then run
cmake .
ctest -V -S my.ctest 1> mytest.stdout 2> mytest.stderr

Look at the output of mytest.stdout and mytest.stderr

Also, mytest.stderr contains:
Error in read script: /home/cjstimp/cubit/cdash/test-ctest/my.ctest
However, the script itself did run successfully.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038944)
Brad King (manager)
2015-06-18 09:08

> hoping that mytest.stderr will contain only errors in my script, not build or test errors

That makes sense. It would require a fairly tedious audit of the CTest source to address this though.
(0042798)
Kitware Robot (administrator)
2016-06-10 14:29

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
2015-06-16 18:41 Clinton Stimpson New Issue
2015-06-18 09:08 Brad King Note Added: 0038944
2016-06-10 14:29 Kitware Robot Note Added: 0042798
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team