Просмотр исходного кода

For Travis CI - revert back the multiplier as it is still not enough.
Instead set the EMRUN timeout to the maximum value possible before the testing process being timeout by Travis CI itself.

Yao Wei Tjong 姚伟忠 10 лет назад
Родитель
Сommit
2a75dbbe2f
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      CMake/Modules/Urho3D-CMake-common.cmake

+ 7 - 1
CMake/Modules/Urho3D-CMake-common.cmake

@@ -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})