CMakeLists.txt 1.3 KB
Newer Older
T
Tao Luo 已提交
1
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*_new_api.py")
2 3
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

T
Tao Luo 已提交
4 5 6 7
# This test is buggy
# py_test(test_understand_sentiment_dynamic_rnn SRCS
# 	test_understand_sentiment_dynamic_rnn.py SERIAL)
LIST(REMOVE_ITEM TEST_OPS test_understand_sentiment_dynamic_rnn_new_api)
8

T
Tao Luo 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
if(NOT APPLE)
    # default test
    foreach(src ${TEST_OPS})
        py_test(${src} SRCS ${src}.py)
    endforeach()
else()
    foreach(src ${TEST_OPS})
        if(${src} STREQUAL "test_image_classification_vgg_new_api")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif(${src} STREQUAL "test_image_classification_resnet_new_api")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif(${src} STREQUAL "test_recognize_digits_conv_new_api")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif(${src} STREQUAL "test_recognize_digits_mlp_new_api")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif()
            py_test(${src} SRCS ${src}.py)
26
            set_tests_properties(${src} PROPERTIES LABELS "RUN_TYPE=DIST")
T
Tao Luo 已提交
27 28 29
        endif()
    endforeach()
endif()