From a8b5741fb4212aec60eb99f47f105612a2bd024d Mon Sep 17 00:00:00 2001 From: YUNSHEN XIE <1084314248@qq.com> Date: Tue, 25 Aug 2020 11:29:27 +0800 Subject: [PATCH] add a few unittests for setting timeout properity (#26630) --- paddle/fluid/inference/tests/api/CMakeLists.txt | 2 ++ python/paddle/fluid/contrib/slim/tests/CMakeLists.txt | 2 +- python/paddle/incubate/hapi/tests/CMakeLists.txt | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/tests/api/CMakeLists.txt b/paddle/fluid/inference/tests/api/CMakeLists.txt index 9a3a73f6c9..1b79c77c69 100644 --- a/paddle/fluid/inference/tests/api/CMakeLists.txt +++ b/paddle/fluid/inference/tests/api/CMakeLists.txt @@ -132,6 +132,7 @@ if(NOT APPLE AND WITH_MKLML) set(SEQ_POOL1_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/seq_pool") download_model_and_data(${SEQ_POOL1_INSTALL_DIR} "seq_pool1_model_.tar.gz" "seq_pool1_data.txt.tar.gz") inference_analysis_api_test(test_analyzer_seq_pool1 ${SEQ_POOL1_INSTALL_DIR} analyzer_seq_pool1_tester.cc) + set_tests_properties(test_analyzer_seq_pool1 PROPERTIES TIMEOUT 150) else() # TODO: fix this test on MACOS and OPENBLAS, the reason is that # fusion_seqexpand_concat_fc_op is not supported on MACOS and OPENBLAS @@ -191,6 +192,7 @@ download_result(${ERNIE_INSTALL_DIR} "Ernie_large_result.txt.tar.gz") inference_analysis_test(test_analyzer_ernie_large SRCS analyzer_ernie_tester.cc EXTRA_DEPS ${INFERENCE_EXTRA_DEPS} ARGS --infer_model=${ERNIE_INSTALL_DIR}/model --infer_data=${ERNIE_INSTALL_DIR}/data.txt --refer_result=${ERNIE_INSTALL_DIR}/result.txt --ernie_large=true) +set_tests_properties(test_analyzer_ernie_large PROPERTIES TIMEOUT 150) # text_classification set(TEXT_CLASSIFICATION_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/text_classification") diff --git a/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt b/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt index a5f2f94213..f0943b72ad 100644 --- a/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt +++ b/python/paddle/fluid/contrib/slim/tests/CMakeLists.txt @@ -271,6 +271,6 @@ endforeach() # setting timeout value for old unittests if(NOT WIN32) - set_tests_properties(test_post_training_quantization_mobilenetv1 PROPERTIES TIMEOUT 200) + set_tests_properties(test_post_training_quantization_mobilenetv1 PROPERTIES TIMEOUT 250) set_tests_properties(test_post_training_quantization_resnet50 PROPERTIES TIMEOUT 200) endif() diff --git a/python/paddle/incubate/hapi/tests/CMakeLists.txt b/python/paddle/incubate/hapi/tests/CMakeLists.txt index 5cad495de7..8ffcd67443 100644 --- a/python/paddle/incubate/hapi/tests/CMakeLists.txt +++ b/python/paddle/incubate/hapi/tests/CMakeLists.txt @@ -12,6 +12,7 @@ endforeach() foreach(src ${TEST_OPS}) py_test(${src} SRCS ${src}.py) endforeach() +set_tests_properties(test_dataset_imdb PROPERTIES TIMEOUT 150) function(py_dist_test TARGET_NAME) -- GitLab