forked from qt-creator/qt-creator
GitHub Actions: Set timeout for running tests
Timeout of 5s for tests that do not have the TIMEOUT property, and 600s for the whole teset suite. Change-Id: Ie58f1ec2f657448a963bf51d6e93cad142603120 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
3
.github/workflows/build_cmake.yml
vendored
3
.github/workflows/build_cmake.yml
vendored
@@ -426,12 +426,13 @@ jobs:
|
|||||||
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
|
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ctest -j ${N}
|
COMMAND ctest -j ${N} --timeout 5
|
||||||
WORKING_DIRECTORY build/build
|
WORKING_DIRECTORY build/build
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
OUTPUT_VARIABLE output
|
OUTPUT_VARIABLE output
|
||||||
ERROR_VARIABLE output
|
ERROR_VARIABLE output
|
||||||
ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE
|
ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE
|
||||||
|
TIMEOUT 600
|
||||||
)
|
)
|
||||||
if (NOT result EQUAL 0)
|
if (NOT result EQUAL 0)
|
||||||
string(REGEX MATCH "[0-9]+% tests.*[0-9.]+ sec.*$" test_results "${output}")
|
string(REGEX MATCH "[0-9]+% tests.*[0-9.]+ sec.*$" test_results "${output}")
|
||||||
|
Reference in New Issue
Block a user