CMakeLists.txt 417 字节
Newer Older
D
Dang Qingqing 已提交
1 2 3
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

4 5 6 7
if(APPLE OR WIN32 OR NOT WITH_MKL)
    list(REMOVE_ITEM TEST_OPS test_calibration)
endif()

D
Dang Qingqing 已提交
8
foreach(src ${TEST_OPS})
Z
Zhang, Guoming 已提交
9 10 11 12 13
    if(src MATCHES "test_calibration")
        py_test(${src} SRCS ${src}.py ENVS FLAGS_use_mkldnn=true)
    else()
        py_test(${src} SRCS ${src}.py)
    endif()
D
Dang Qingqing 已提交
14
endforeach()