file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

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")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif(${src} STREQUAL "test_image_classification_resnet")
            message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src})
        elseif()
            py_test(${src} SRCS ${src}.py)
        endif()
    endforeach()
endif()
