add 2 unittests
Some checks failed
Validate Operations / validate-operations (push) Failing after 8m9s
Some checks failed
Validate Operations / validate-operations (push) Failing after 8m9s
fix bugs
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_custom_target(pim-unittest)
|
||||
set_target_properties(pim-unittest PROPERTIES FOLDER "Tests")
|
||||
|
||||
add_custom_target(check-pim-unittest
|
||||
COMMENT "Running the PIM unit tests"
|
||||
COMMAND "${CMAKE_CTEST_COMMAND}" -L pim-unittest --output-on-failure -C $<CONFIG> --force-new-ctest-process
|
||||
USES_TERMINAL
|
||||
DEPENDS pim-unittest
|
||||
)
|
||||
set_target_properties(check-pim-unittest PROPERTIES FOLDER "Tests")
|
||||
set_target_properties(check-pim-unittest PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
|
||||
|
||||
function(add_pim_unittest test_name)
|
||||
add_onnx_mlir_executable(${test_name} NO_INSTALL ${ARGN})
|
||||
|
||||
add_dependencies(pim-unittest ${test_name})
|
||||
get_target_property(test_suite_folder pim-unittest FOLDER)
|
||||
if (test_suite_folder)
|
||||
set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
|
||||
endif ()
|
||||
|
||||
add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${test_name} PROPERTIES LABELS pim-unittest)
|
||||
endfunction()
|
||||
|
||||
add_pim_unittest(TestPIM
|
||||
TestPIM.cpp
|
||||
|
||||
LINK_LIBS PRIVATE
|
||||
OMPimCommon
|
||||
SpatialOps
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user