Skip to content

Commit 39fe0d3

Browse files
authored
find timeout unittests (#26371)
* find timeout unittests * setting timeout value * fix some error * fix some error * fix some error * fix no newline of end file error
1 parent 317f7ce commit 39fe0d3

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

cmake/generic.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ function(cc_test_run TARGET_NAME)
384384
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
385385
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
386386
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
387-
# No unit test should exceed 10 minutes.
388-
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
387+
# No unit test should exceed 2 minutes.
388+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 120)
389389
endif()
390390
endfunction()
391391

@@ -743,8 +743,8 @@ function(py_test TARGET_NAME)
743743
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
744744
endif()
745745

746-
# No unit test should exceed 10 minutes.
747-
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
746+
# No unit test should exceed 2 minutes.
747+
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 120)
748748
endif()
749749
endfunction()
750750

python/paddle/fluid/contrib/slim/tests/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ list(REMOVE_ITEM TEST_OPS
263263
#TODO(wanghaoshuang): Fix this unitest failed on GCC8.
264264
LIST(REMOVE_ITEM TEST_OPS test_auto_pruning)
265265
LIST(REMOVE_ITEM TEST_OPS test_filter_pruning)
266+
266267
foreach(src ${TEST_OPS})
267268
py_test(${src} SRCS ${src}.py)
268269
endforeach()
270+
271+
# setting timeout value for old unittests
272+
if(NOT WIN32)
273+
set_tests_properties(test_post_training_quantization_mobilenetv1 PROPERTIES TIMEOUT 200)
274+
set_tests_properties(test_post_training_quantization_resnet50 PROPERTIES TIMEOUT 200)
275+
endif()

python/paddle/fluid/tests/unittests/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ list(REMOVE_ITEM TEST_OPS test_conv3d_transpose_op)
326326
# disable this unittest temporarily
327327
list(REMOVE_ITEM TEST_OPS test_imperative_data_loader_exception)
328328
list(REMOVE_ITEM TEST_OPS test_sampling_id_op)
329+
330+
329331
if (APPLE OR WIN32)
330332
list(REMOVE_ITEM TEST_OPS test_dataset)
331333
list(REMOVE_ITEM TEST_OPS test_dataset_dataloader)
@@ -567,3 +569,11 @@ if(NOT WIN32 AND NOT APPLE)
567569
set_tests_properties(test_multiprocess_dataloader_iterable_dataset_static PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE")
568570
set_tests_properties(test_multiprocess_dataloader_iterable_dataset_dynamic PROPERTIES LABELS "RUN_TYPE=EXCLUSIVE")
569571
endif()
572+
573+
# setting timeout value for old unittests
574+
# set_tests_properties(test_dist_fleet_sparse_embedding_ctr PROPERTIES TIMEOUT 200)
575+
set_tests_properties(test_fused_elemwise_activation_op PROPERTIES TIMEOUT 150)
576+
set_tests_properties(test_gru_op PROPERTIES TIMEOUT 200)
577+
set_tests_properties(test_layer_norm_op PROPERTIES TIMEOUT 150)
578+
set_tests_properties(test_pool3d_op PROPERTIES TIMEOUT 150)
579+
set_tests_properties(test_regularizer PROPERTIES TIMEOUT 150)

0 commit comments

Comments
 (0)