|
|
@@ -1146,12 +1146,11 @@ macro (setup_test)
|
|
|
list (APPEND ARG_OPTIONS -timeout ${URHO3D_TEST_TIMEOUT})
|
|
|
if (EMSCRIPTEN)
|
|
|
if (DEFINED ENV{CI})
|
|
|
- # The latency on Travis CI server could be very high at time, so set it to the maximum allowed by Travis CI before the process being timed out by Travis CI itself
|
|
|
- set (EMRUN_TIMEOUT 590) # 10 minutes (Travis CI timeout) - 10 seconds
|
|
|
- else ()
|
|
|
- # Non-CI test
|
|
|
- math (EXPR EMRUN_TIMEOUT "2 * ${URHO3D_TEST_TIMEOUT}")
|
|
|
+ # The latency on Travis CI server could be very high at time, so add some adjustment
|
|
|
+ # If it is not enough causing a test case failure then so be it because it is better that than wait for it and still ends up in build error due to time limit
|
|
|
+ set (EMRUN_TIMEOUT_ADJUSTMENT + 8 * \\${URHO3D_TEST_TIMEOUT})
|
|
|
endif ()
|
|
|
+ math (EXPR EMRUN_TIMEOUT "2 * ${URHO3D_TEST_TIMEOUT} ${EMRUN_TIMEOUT_ADJUSTMENT}")
|
|
|
add_test (NAME ${ARG_NAME} COMMAND ${EMRUN} --browser ${EMSCRIPTEN_EMRUN_BROWSER} --timeout ${EMRUN_TIMEOUT} --timeout_returncode 1 --kill_exit ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TARGET_NAME}.html ${ARG_OPTIONS})
|
|
|
else ()
|
|
|
add_test (NAME ${ARG_NAME} COMMAND ${TARGET_NAME} ${ARG_OPTIONS})
|