diff --git a/cmake/generic.cmake b/cmake/generic.cmake index b0a6dfe29020781e57d57861137861366864abdb..bac9da3e56c37d209c3d38c25279f9e61acc694e 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -386,9 +386,9 @@ function(cc_test_run TARGET_NAME) set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true) # No unit test should exceed 2 minutes. if (APPLE OR WIN32) - set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 150) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 20) else() - set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 120) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 15) endif() endif() endfunction() @@ -748,10 +748,10 @@ function(py_test TARGET_NAME) endif() if (APPLE OR WIN32) - set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 150) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 20) else() # No unit test should exceed 2 minutes in Linux. - set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 120) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 15) endif() endif() diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index 8d236dca22f2266771a029b7cdbf7db21aefb1fe..f442f16ef126665a2fe433ab656a0c88e1a4c8b0 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -208,7 +208,7 @@ function(py_test_modules TARGET_NAME) set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1) endif() - set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 350) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 15) endif() endfunction() @@ -224,7 +224,7 @@ function(bash_test_modules TARGET_NAME) cmake_parse_arguments(bash_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - set(timeout 350) + set(timeout 15) if(${bash_test_modules_TIMEOUT}) set(timeout ${bash_test_modules_TIMEOUT}) endif() @@ -266,7 +266,7 @@ function(parallel_bash_test_modules TARGET_NAME) cmake_parse_arguments(parallel_bash_test_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - set(timeout 120) + set(timeout 15) if(${parallel_bash_test_modules_TIMEOUT}) set(timeout ${parallel_bash_test_modules_TIMEOUT}) endif()