CMakeLists.txt 676 字节
Newer Older
1 2 3 4
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

# default test
J
JiabinYang 已提交
5 6 7 8 9 10 11 12
if(NOT APPLE)
    foreach(src ${TEST_OPS})
        py_test(${src} SRCS ${src}.py)
    endforeach()
else()
    foreach(src ${TEST_OPS})
        if(${src} STREQUAL "test_recognize_digits_conv")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
13 14
        elseif(${src} STREQUAL "test_recognize_digits_mlp")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
J
JiabinYang 已提交
15 16 17 18 19
        else()
            py_test(${src} SRCS ${src}.py)
        endif()
    endforeach()
endif()