Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell committed Nov 14, 2023
1 parent 119d818 commit 5bd8aeb
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if(${NOTEST})
if (${NOTEST})
message(STATUS "Skipping test targets")
else()
else ()
set(NOTEST "TRUE")
aq_require(acquire-driver-common)
aq_require(acquire-video-runtime)
Expand All @@ -15,62 +15,62 @@ else()
# Tests
#
set(tests
list-devices
# get-meta # FIXME
# unit-tests
# multiscale-with-trivial-tile-size
# no-set-chunking
# write-zarr-compressed-multiscale
# write-zarr-compressed-with-chunking
# write-zarr-compressed-with-chunking-and-rollover
# write-zarr-raw-multiscale
# write-zarr-raw-with-chunking
write-zarr-raw-with-chunking-and-rollover
# write-zarr-raw-with-ragged-tiling
# write-zarr-v3-compressed
# write-zarr-v3-raw
# write-zarr-with-defaults
# write-zarr-with-lz4-compression
# write-zarr-with-zstd-compression
list-devices
get-meta
unit-tests
multiscale-with-trivial-tile-size
no-set-chunking
write-zarr-compressed-multiscale
write-zarr-compressed-with-chunking
write-zarr-compressed-with-chunking-and-rollover
write-zarr-raw-multiscale
write-zarr-raw-with-chunking
write-zarr-raw-with-chunking-and-rollover
write-zarr-raw-with-ragged-tiling
write-zarr-v3-compressed
write-zarr-v3-raw
write-zarr-with-defaults
write-zarr-with-lz4-compression
write-zarr-with-zstd-compression
)

foreach(name ${tests})
foreach (name ${tests})
set(tgt "${project}-${name}")
add_executable(${tgt} ${name}.cpp)
target_compile_definitions(${tgt} PUBLIC "TEST=\"${tgt}\"")
set_target_properties(${tgt} PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
)
target_include_directories(${tgt} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/../")
target_link_libraries(${tgt}
acquire-core-logger
acquire-core-platform
acquire-video-runtime
acquire-core-logger
acquire-core-platform
acquire-video-runtime
)

add_test(NAME test-${tgt} COMMAND ${tgt})
set_tests_properties(test-${tgt} PROPERTIES LABELS "anyplatform;acquire-driver-zarr")
endforeach()
endforeach ()

#
# Copy driver to tests
#
list(POP_FRONT tests onename)

foreach(driver
acquire-driver-common
acquire-driver-zarr
foreach (driver
acquire-driver-common
acquire-driver-zarr
)
add_custom_target(${project}-copy-${driver}-for-tests
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${driver}>
$<TARGET_FILE_DIR:${project}-${onename}>
DEPENDS ${driver}
COMMENT "Copying ${driver} to $<TARGET_FILE_DIR:${project}-${onename}>"
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${driver}>
$<TARGET_FILE_DIR:${project}-${onename}>
DEPENDS ${driver}
COMMENT "Copying ${driver} to $<TARGET_FILE_DIR:${project}-${onename}>"
)

foreach(name ${tests})
foreach (name ${tests})
add_dependencies(${tgt} ${project}-copy-${driver}-for-tests)
endforeach()
endforeach()
endif()
endforeach ()
endforeach ()
endif ()

0 comments on commit 5bd8aeb

Please sign in to comment.