From 9adedc1f00d288d9d52d33d9089ebaad7e163286 Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov <y.lobankov@tarantool.org> Date: Tue, 21 Jun 2022 19:14:49 +0300 Subject: [PATCH] test: add new `make` test targets This patch adds the new `make` test targets to run unit and functional tests independending on each other. In some cases it can be useful. New test targets: * `test-unit` - run unit tests and exit after the first failure * `test-unit-force` - run unit tests * `test-func` - run functional tests and exit after the first failure * `test-func-force` - run functional tests Note, tests for 'small' lib are considered as unit tests as well. Part of tarantool/tarantool-qa#246 NO_DOC=testing stuff NO_TEST=testing stuff NO_CHANGELOG=testing stuff --- test/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 729baa9388..77a3c83180 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -48,6 +48,34 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/small add_custom_target(symlink_libsmall_test_binaries ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/small) +add_custom_target(test-unit + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/small + COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py + --builddir=${PROJECT_BINARY_DIR} + small/ + unit/) + +add_custom_target(test-unit-force + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/small + COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py + --builddir=${PROJECT_BINARY_DIR} + --force + small/ + unit/) + +add_custom_target(test-func + COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py + --builddir=${PROJECT_BINARY_DIR} + --exclude small/ + --exclude unit/) + +add_custom_target(test-func-force + COMMAND ${PROJECT_SOURCE_DIR}/test/test-run.py + --builddir=${PROJECT_BINARY_DIR} + --exclude small/ + --exclude unit/ + --force) + add_custom_target(test DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/small LuaJIT-test -- GitLab