[cmake-commits] martink committed CMakeLists.txt 1.320 1.321
cmGlobalGenerator.cxx 1.165 1.166 cmGlobalGenerator.h 1.68 1.69
ctest.cxx 1.92 1.93
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jan 30 11:35:20 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19147/Source
Modified Files:
CMakeLists.txt cmGlobalGenerator.cxx cmGlobalGenerator.h
ctest.cxx
Log Message:
BUG: fixes so that --build-and-test will honor timeouts
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- cmGlobalGenerator.h 9 Nov 2006 14:57:23 -0000 1.68
+++ cmGlobalGenerator.h 30 Jan 2007 16:35:17 -0000 1.69
@@ -100,7 +100,8 @@
const char *projectName, const char *targetName,
std::string *output,
const char *makeProgram, const char *config,
- bool clean, bool fast);
+ bool clean, bool fast,
+ double timeout);
virtual std::string GenerateBuildCommand
(const char* makeProgram,
const char *projectName, const char* additionalOptions,
@@ -125,7 +126,7 @@
void AddInstallComponent(const char* component);
void EnableInstallTarget();
- static int s_TryCompileTimeout;
+ int TryCompileTimeout;
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
bool GetToolSupportsColor() { return this->ToolSupportsColor; }
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CMakeLists.txt,v
retrieving revision 1.320
retrieving revision 1.321
diff -u -d -r1.320 -r1.321
--- CMakeLists.txt 25 Jan 2007 20:44:52 -0000 1.320
+++ CMakeLists.txt 30 Jan 2007 16:35:17 -0000 1.321
@@ -383,6 +383,13 @@
OPTION(CMAKE_RUN_LONG_TESTS "Should the long tests be run (such as Bootstrap)." ON)
MARK_AS_ADVANCED(CMAKE_RUN_LONG_TESTS)
+ IF (CMAKE_RUN_LONG_TESTS)
+ OPTION(CTEST_TEST_CTEST
+ "Should the tests that run a full sub ctest process be run?"
+ OFF)
+ MARK_AS_ADVANCED(CTEST_TEST_CTEST)
+ ENDIF (CMAKE_RUN_LONG_TESTS)
+
ADD_TEST(CommandLineTest ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CommandLineTest"
@@ -1071,6 +1078,10 @@
-S "${CMake_BINARY_DIR}/Tests/CTestTest3/test.cmake" -V
--output-log "${CMake_BINARY_DIR}/Tests/CTestTest3/testOutput.log"
)
+ # these tests take a log time, make sure they have it
+ SET_TESTS_PROPERTIES ( CTestTest CTestTest2 CTestTest3
+ PROPERTIES TIMEOUT 1500
+ )
ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
IF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode)
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- cmGlobalGenerator.cxx 7 Dec 2006 14:44:45 -0000 1.165
+++ cmGlobalGenerator.cxx 30 Jan 2007 16:35:17 -0000 1.166
@@ -28,8 +28,6 @@
#include <assert.h>
-int cmGlobalGenerator::s_TryCompileTimeout = 0;
-
cmGlobalGenerator::cmGlobalGenerator()
{
// By default the .SYMBOLIC dependency is not needed on symbolic rules.
@@ -49,6 +47,9 @@
// Whether an install target is needed.
this->InstallTargetEnabled = false;
+
+ // how long to let try compiles run
+ this->TryCompileTimeout = 0;
}
cmGlobalGenerator::~cmGlobalGenerator()
@@ -808,7 +809,8 @@
const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION");
return this->Build(srcdir,bindir,projectName,
newTarget.c_str(),
- output,makeCommand.c_str(),config,false,true);
+ output,makeCommand.c_str(),config,false,true,
+ this->TryCompileTimeout);
}
std::string cmGlobalGenerator
@@ -852,7 +854,8 @@
std::string *output,
const char *makeCommandCSTR,
const char *config,
- bool clean, bool fast)
+ bool clean, bool fast,
+ double timeout)
{
*output += "\nTesting TryCompileWithoutMakefile\n";
@@ -863,7 +866,6 @@
cmSystemTools::ChangeDirectory(bindir);
int retVal;
- int timeout = cmGlobalGenerator::s_TryCompileTimeout;
bool hideconsole = cmSystemTools::GetRunCommandHideConsole();
cmSystemTools::SetRunCommandHideConsole(true);
Index: ctest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/ctest.cxx,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- ctest.cxx 25 Jan 2007 16:16:16 -0000 1.92
+++ ctest.cxx 30 Jan 2007 16:35:17 -0000 1.93
@@ -148,7 +148,7 @@
"complete. Other options that affect this mode are --build-target "
"--build-nocmake, --build-run-dir, "
"--build-two-config, --build-exe-dir, --build-project,"
- "--build-noclean, --build-options, --test-timeout"},
+ "--build-noclean, --build-options"},
{"--build-target", "Specify a specific target to build.",
"This option goes with the --build-and-test option, if left out the all "
"target is built." },
@@ -168,7 +168,7 @@
{"--test-command", "The test to run with the --build-and-test option.", ""
},
- {"--test-timeout", "The time limit in seconds for --test-command.", ""
+ {"--test-timeout", "The time limit in seconds, internal use only.", ""
},
{"--tomorrow-tag", "Nightly or experimental starts with next day tag.",
"This is useful if the build will not finish in one day." },
More information about the Cmake-commits
mailing list