From 8fdca686b3d4659328dafd5501dd25daef4e711a Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 4 Jun 2007 13:39:43 -0400 Subject: ENH: fix passing of time limit to some ctest invocations that also use build-options --- Source/CTest/cmCTestBuildAndTestHandler.cxx | 4 ++-- Source/cmCTest.cxx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index d1a7736..83ccb19 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -457,8 +457,8 @@ int cmCTestBuildAndTestHandler::ProcessCommandLineArguments( { this->BuildOptions.push_back(allArgs[idx]); if(idx+1 < allArgs.size() - && (allArgs[idx+1] == "--build-target" || - allArgs[idx+1] == "--test-command")) + && (allArgs[idx+1] == "--build-target" || + allArgs[idx+1] == "--test-command")) { done = true; } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 57eee39..db6c38c 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1094,8 +1094,10 @@ int cmCTest::RunTest(std::vector argv, { if(argv[i]) { - // if this test has a test command make sure we pass the timeout in - if (strcmp(argv[i],"--test-command") == 0 && testTimeOut) + // make sure we pass the timeout in for any build and test + // invocations. Since --build-generator is required this is a + // good place to check for it, and to add the arguments in + if (strcmp(argv[i],"--build-generator") == 0 && testTimeOut) { args.push_back("--test-timeout"); cmOStringStream msg; -- cgit v0.12