For convenient tests invocation.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
+IF(UNIT_TESTING)
+ ENABLE_TESTING()
+ ADD_SUBDIRECTORY(tests)
+ENDIF()
+
INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h
DESTINATION include
)
INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h
DESTINATION include
)
--- /dev/null
+ADD_SUBDIRECTORY(shunit2)
--- /dev/null
+ADD_TEST(
+ NAME shunit2
+ COMMAND tests.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+SET_PROPERTY(TEST shunit2 APPEND PROPERTY ENVIRONMENT "UCI_BIN=$<TARGET_FILE:cli>")