The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15619 
====================================================================== 
Reported By:                Clinton Stimpson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15619
Category:                   CTest
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-06-16 18:41 EDT
Last Modified:              2015-06-16 18:41 EDT
====================================================================== 
Summary:                    ctest stderr vs stdout
Description: 
I 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 Reproduce: 
All 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.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-06-16 18:41 Clinton StimpsonNew Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to