From b30f627190fce88d8c08dc4686abccc6c7df6f3d Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Mon, 7 Dec 2009 13:25:54 -0500 Subject: [PATCH] CMake global timeout (--timeout option) should prevail over individual test timeouts if it is lower than the individual timeout. --- Source/CTest/cmCTestTestHandler.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index cbac2726c..1718ac385 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1051,7 +1051,8 @@ void cmCTestTestHandler::ProcessDirectory(std::vector &passed, p.Cost = rand(); } - if(p.Timeout == 0 && this->CTest->GetGlobalTimeout() != 0) + if((p.Timeout == 0 || p.Timeout > this->CTest->GetGlobalTimeout()) + && this->CTest->GetGlobalTimeout() != 0) { p.Timeout = this->CTest->GetGlobalTimeout(); }