Test: Switch from using Python for CInema to C impl
Vicki Pfau vi@endrift.com
Sun, 28 Jun 2020 00:47:53 -0700
2 files changed,
4 insertions(+),
4 deletions(-)
M
src/platform/python/CMakeLists.txt
→
src/platform/python/CMakeLists.txt
@@ -54,9 +54,8 @@ COMMAND BINDIR=${CMAKE_CURRENT_BINARY_DIR}/.. LIBDIR=${CMAKE_CURRENT_BINARY_DIR}/.. CPPFLAGS="${INCLUDE_FLAGS}" ${PYTHON_EXECUTABLE} setup.py bdist_wheel -b ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${BINARY_NAME}-py) -file(GLOB BASE_TESTS ${CMAKE_CURRENT_SOURCE_DIR}/test_*.py) -file(GLOB SUBTESTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*/test_*.py) -foreach(TEST IN LISTS BASE_TESTS SUBTESTS) +file(GLOB TESTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/*/test_*.py) +foreach(TEST IN LISTS TESTS) if(APPLE) set(PATH DYLD_LIBRARY_PATH) elseif(WIN32)@@ -64,7 +63,7 @@ set(PATH PATH)
else() set(PATH LD_LIBRARY_PATH) endif() - string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/(tests/.*/)?test_" "" TEST_NAME "${TEST}") + string(REGEX REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/tests/(.*/)?test_" "" TEST_NAME "${TEST}") string(REPLACE ".py" "" TEST_NAME "${TEST_NAME}") add_test(NAME python-${TEST_NAME} COMMAND ${PYTHON_EXECUTABLE} setup.py build -b ${CMAKE_CURRENT_BINARY_DIR} pytest --extras --addopts ${TEST}
M
src/platform/test/CMakeLists.txt
→
src/platform/test/CMakeLists.txt
@@ -43,4 +43,5 @@ enable_testing()
add_executable(${BINARY_NAME}-cinema ${CMAKE_CURRENT_SOURCE_DIR}/cinema-main.c) target_link_libraries(${BINARY_NAME}-cinema ${BINARY_NAME} ${PLATFORM_LIBRARY}) set_target_properties(${BINARY_NAME}-cinema PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}") + add_test(cinema ${BINARY_NAME}-cinema -v) endif()