Browse Source

build: set test timeout once for all workflows

Michele Caini 2 years ago
parent
commit
639191af23

+ 4 - 4
.github/workflows/build.yml

@@ -71,7 +71,7 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4
 
   windows:
     timeout-minutes: 15
@@ -100,7 +100,7 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4
 
   macos:
     timeout-minutes: 15
@@ -117,7 +117,7 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4
 
   extra:
     timeout-minutes: 15
@@ -141,4 +141,4 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4

+ 1 - 1
.github/workflows/coverage.yml

@@ -22,7 +22,7 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4
     - name: Collect data
       working-directory: build
       run: |

+ 1 - 1
.github/workflows/sanitizer.yml

@@ -28,4 +28,4 @@ jobs:
       working-directory: build
       env:
         CTEST_OUTPUT_ON_FAILURE: 1
-      run: ctest --timeout 60 -C Debug -j4
+      run: ctest -C Debug -j4

+ 1 - 0
test/CMakeLists.txt

@@ -113,6 +113,7 @@ function(SETUP_BASIC_TEST TEST_NAME TEST_SOURCES)
     target_link_libraries(${TEST_NAME} PRIVATE GTest::Main Threads::Threads)
     SETUP_TARGET(${TEST_NAME} ${ARGN})
     add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
+    set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT 60)
 endfunction()
 
 function(SETUP_LIB_SHARED_TEST TEST_NAME SUB_PATH)