|
|
@@ -1127,7 +1127,13 @@ macro (setup_test)
|
|
|
endif ()
|
|
|
list (APPEND ARG_OPTIONS -timeout ${URHO3D_TEST_TIMEOUT})
|
|
|
if (EMSCRIPTEN)
|
|
|
- math (EXPR EMRUN_TIMEOUT "5 * ${URHO3D_TEST_TIMEOUT}")
|
|
|
+ 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}")
|
|
|
+ endif ()
|
|
|
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})
|