Skip to content

Commit e8e762f

Browse files
committed
fix mac unittest 279/395 error without distribute
1 parent 253f618 commit e8e762f

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ list(REMOVE_ITEM TEST_OPS op_test) # op_test is a helper python file, not a test
3030
list(REMOVE_ITEM TEST_OPS decorators) # decorators is a helper python file, not a test
3131

3232
if(APPLE)
33-
message(WARNING "These tests has been disabled in OSX before being fixed: \n test_detection_map_op \n test_desc_clone \n test_debugger \n test_program_code \n test_dist_transformer \n test_dist_se_resnext")
33+
if(NOT WITH_DISTRIBUTE)
34+
list(REMOVE_ITEM TEST_OPS test_desc_clone)
35+
list(REMOVE_ITEM TEST_OPS test_program_code)
36+
endif(NOT WITH_DISTRIBUTE)
37+
message(WARNING "These tests has been disabled in OSX before being fixed: \n test_detection_map_op \n test_dist_se_resnext")
3438
# this op is not support on mac
3539
list(REMOVE_ITEM TEST_OPS test_fusion_seqexpand_concat_fc_op)
3640
# TODO: add the unitest back when it fixed
3741
list(REMOVE_ITEM TEST_OPS test_detection_map_op)
38-
list(REMOVE_ITEM TEST_OPS test_desc_clone)
39-
list(REMOVE_ITEM TEST_OPS test_debugger)
40-
list(REMOVE_ITEM TEST_OPS test_program_code)
41-
list(REMOVE_ITEM TEST_OPS test_dist_transformer)
4242
list(REMOVE_ITEM TEST_OPS test_dist_se_resnext)
4343
endif()
4444

@@ -72,12 +72,15 @@ endforeach(TEST_OP)
7272
py_test_modules(test_warpctc_op MODULES test_warpctc_op ENVS FLAGS_warpctc_dir=${WARPCTC_LIB_DIR} SERIAL)
7373
if(WITH_DISTRIBUTE)
7474
py_test_modules(test_dist_train MODULES test_dist_train SERIAL)
75-
set_tests_properties(test_listen_and_serv_op PROPERTIES TIMEOUT 20)
76-
set_tests_properties(test_dist_mnist PROPERTIES TIMEOUT 200)
77-
set_tests_properties(test_dist_word2vec PROPERTIES TIMEOUT 200)
75+
if (NOT APPLE)
76+
set_tests_properties(test_listen_and_serv_op PROPERTIES TIMEOUT 20)
77+
set_tests_properties(test_dist_mnist PROPERTIES TIMEOUT 200)
78+
set_tests_properties(test_dist_word2vec PROPERTIES TIMEOUT 200)
79+
py_test_modules(test_dist_se_resnext MODULES test_dist_se_resnext SERIAL)
80+
endif(NOT APPLE)
7881
py_test_modules(test_dist_transpiler MODULES test_dist_transpiler)
7982
py_test_modules(test_dist_transformer MODULES test_dist_transformer SERIAL)
80-
py_test_modules(test_dist_se_resnext MODULES test_dist_se_resnext SERIAL)
83+
8184
endif()
8285
py_test_modules(test_parallel_executor_crf MODULES test_parallel_executor_crf SERIAL)
8386
py_test_modules(test_parallel_executor_fetch_feed MODULES test_parallel_executor_fetch_feed SERIAL)

0 commit comments

Comments
 (0)