From 72c78e4dbbdf74fe9995d9b0757ca6e5832c79d7 Mon Sep 17 00:00:00 2001 From: YUNSHEN XIE <1084314248@qq.com> Date: Mon, 9 Nov 2020 00:58:09 +0800 Subject: [PATCH] exec ut no more than 15s 2 (#28441) * exec ut no more than 15s 2 * fix for ut test_inplace_addto_strategy timeout --- cmake/generic.cmake | 8 ++++---- python/paddle/fluid/tests/unittests/CMakeLists.txt | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index a2386265367..6f4ec24851d 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() @@ -758,10 +758,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 a344e04ed4d..66952537b7b 100644 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -215,7 +215,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() @@ -776,3 +776,4 @@ endif() if(WITH_GPU) set_tests_properties(test_imperative_auto_mixed_precision PROPERTIES TIMEOUT 120) endif() +set_tests_properties(test_inplace_addto_strategy PROPERTIES TIMEOUT 120) -- GitLab