From bf344999cbbcda5de19ef61f212f7f18c6aceb44 Mon Sep 17 00:00:00 2001 From: hoffman Date: Sun, 23 Nov 2008 15:49:45 +0000 Subject: [PATCH] ENH: add more debug stuff to CTestCTest2 so I can figure out redwall --- Source/CTest/cmCTestCoverageHandler.cxx | 6 ++++-- Source/CTest/cmCTestScriptHandler.cxx | 9 +++++++-- Source/cmCTest.cxx | 20 ++++++++++++++++++-- Tests/CMakeLists.txt | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 1f252c37d..024b7462e 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmCTestCoverageHandler.cxx,v $ Language: C++ - Date: $Date: 2008-08-20 17:24:16 $ - Version: $Revision: 1.56 $ + Date: $Date: 2008-11-23 15:49:46 $ + Version: $Revision: 1.57 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -1641,6 +1641,8 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage( "Error running bullseye summary.\n"); return 0; } + cmCTestLog(this->CTest, DEBUG, "HandleBullseyeCoverage return 1 " + << std::endl); return 1; } diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index c1b8df8b1..88fbe0936 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmCTestScriptHandler.cxx,v $ Language: C++ - Date: $Date: 2008-11-07 20:56:54 $ - Version: $Revision: 1.44 $ + Date: $Date: 2008-11-23 15:49:46 $ + Version: $Revision: 1.45 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -397,6 +397,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) if (!this->Makefile->ReadListFile(0, systemFile.c_str()) || cmSystemTools::GetErrorOccuredFlag()) { + cmCTestLog(this->CTest, DEBUG, "Error in read: " << systemFile.c_str() + << std::endl); return 2; } @@ -404,6 +406,9 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) if (!this->Makefile->ReadListFile(0, script.c_str()) || cmSystemTools::GetErrorOccuredFlag()) { + cmCTestLog(this->CTest, DEBUG, "Error in read script: " + << script.c_str() + << std::endl); return 2; } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 77c1ba374..870150f2d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmCTest.cxx,v $ Language: C++ - Date: $Date: 2008-10-01 13:04:26 $ - Version: $Revision: 1.339 $ + Date: $Date: 2008-11-23 15:49:45 $ + Version: $Revision: 1.340 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -1981,6 +1981,11 @@ int cmCTest::Run(std::vector &args, std::string* output) #ifdef CMAKE_BUILD_WITH_CMAKE cmDynamicLoader::FlushCache(); #endif + if(retv != 0) + { + cmCTestLog(this, DEBUG, "build and test failing returing: " << retv + << std::endl); + } return retv; } @@ -2005,6 +2010,12 @@ int cmCTest::Run(std::vector &args, std::string* output) } this->GetHandler("script")->SetVerbose(this->Verbose); res = this->GetHandler("script")->ProcessHandler(); + if(res != 0) + { + cmCTestLog(this, DEBUG, "running script failing returing: " << res + << std::endl); + } + } else { @@ -2033,6 +2044,11 @@ int cmCTest::Run(std::vector &args, std::string* output) } this->Finalize(); } + if(res != 0) + { + cmCTestLog(this, DEBUG, "Running a test(s) failed returning : " << res + << std::endl); + } return res; } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index a45ce4bc6..1035427d6 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -889,7 +889,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestTest2/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" @ONLY ESCAPE_QUOTES) ADD_TEST(CTestTest2 ${CMAKE_CTEST_COMMAND} - -S "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" -VV + -S "${CMake_BINARY_DIR}/Tests/CTestTest2/test.cmake" -VV --debug --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log" ) CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestTest3/test.cmake.in" -- 2.11.4.GIT