]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: only allow up to 1 hour for a ceph test 10283/head
authorKefu Chai <kchai@redhat.com>
Thu, 14 Jul 2016 07:59:14 +0000 (15:59 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Jul 2016 04:00:47 +0000 (12:00 +0800)
quote from
https://cmake.org/cmake/help/v3.0/prop_test/TIMEOUT.html?highlight=timeout

> If it exceeds that the test process will be killed and ctest will move
> to the next test.

this helps us to identify test hang.

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/AddCephTest.cmake

index 79fdb0c45f6a76360e9b3f4a4ac0d17f802ce9b6..7f6fce30160a3b62f5cc5d74e62090841153a40f 100644 (file)
@@ -15,6 +15,10 @@ function(add_ceph_test test_name test_path)
     PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src:$ENV{PATH}
     PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules/lib.linux-x86_64-2.7:${CMAKE_SOURCE_DIR}/src/pybind
     CEPH_BUILD_VIRTUALENV=${CEPH_BUILD_VIRTUALENV})
+  # none of the tests should take more than 1 hour to complete
+  set_property(TEST
+    ${test_name}
+    PROPERTY TIMEOUT 3600)
 endfunction()
 
 #sets uniform compiler flags and link libraries