From: Willem Jan Withagen Date: Mon, 2 Jul 2018 20:40:38 +0000 (+0200) Subject: cmake: allow setting of the CTest timeout during building. X-Git-Tag: v14.1.0~564^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd71812f876d80d9fd3b2adb2ce77ada3bc6bec7;p=ceph.git cmake: allow setting of the CTest timeout during building. It is rather had to overide a once set timeout during CTesting. This is the best next compromise. Disadvantage is that a rebuild is required. But it helps in my Jenkins testing timely catching run-away programs. Signed-off-by: Willem Jan Withagen --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0af69b440de1..2cd8ab9e5dc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -560,6 +560,8 @@ option(ENABLE_COVERAGE "Coverage is enabled" OFF) option(PG_DEBUG_REFS "PG Ref debugging is enabled" OFF) option(WITH_TESTS "enable the build of ceph-test package scripts/binaries" ON) +set(CEPH_TEST_TIMEOUT 3600 CACHE STRING + "Maximum time before a CTest gets killed" ) # fio option(WITH_FIO "build with fio plugin enabled" OFF) diff --git a/cmake/modules/AddCephTest.cmake b/cmake/modules/AddCephTest.cmake index 4ca83eabba00..2a15c88ab53f 100644 --- a/cmake/modules/AddCephTest.cmake +++ b/cmake/modules/AddCephTest.cmake @@ -20,7 +20,7 @@ function(add_ceph_test test_name test_path) # none of the tests should take more than 1 hour to complete set_property(TEST ${test_name} - PROPERTY TIMEOUT 3600) + PROPERTY TIMEOUT ${CEPH_TEST_TIMEOUT}) endfunction() option(WITH_GTEST_PARALLEL "Enable running gtest based tests in parallel" OFF)