CMakeLists.txt 464 字节
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
    if(src MATCHES "test_calibration")
T
Tao Luo 已提交
10
        py_test(${src} SRCS ${src}.py ENVS FLAGS_use_mkldnn=true FLAGS_OMP_NUM_THREADS=${CPU_NUM_THREADS_ON_CI})
Z
Zhang, Guoming 已提交
11 12 13
    else()
        py_test(${src} SRCS ${src}.py)
    endif()
D
Dang Qingqing 已提交
14
endforeach()