Move test & build_test to top-level cmakelists
This commit is contained in:
+11
-1
@@ -6,5 +6,15 @@ set(VITASTOR_VERSION "2.4.3")
|
|||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_custom_target(build_tests)
|
||||||
|
add_custom_target(test
|
||||||
|
COMMAND
|
||||||
|
echo leak:tcmalloc > ${CMAKE_CURRENT_BINARY_DIR}/lsan-suppress.txt &&
|
||||||
|
env LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_BINARY_DIR}/lsan-suppress.txt ${CMAKE_CTEST_COMMAND}
|
||||||
|
)
|
||||||
|
# make -j16 -C ../../build test_heap && ../../build/src/test/test_heap
|
||||||
|
# make -j16 -C ../../build test_heap && rm -f $(find ../../build -name '*.gcda') && ctest -V -T test -T coverage -R heap --test-dir ../../build && (cd ../../build; gcovr -f ../src --html --html-nested -o coverage/index.html; cd ../src/test)
|
||||||
|
# make -j16 -C ../../build test_blockstore && rm -f $(find ../../build -name '*.gcda') && ctest -V -T test -T coverage -R blockstore --test-dir ../../build && (cd ../../build; gcovr -f ../src --html --html-nested -o coverage/index.html; cd ../src/test)
|
||||||
|
# kcov --include-path=../../../src ../../kcov ./test_blockstore
|
||||||
add_dependencies(test build_tests)
|
add_dependencies(test build_tests)
|
||||||
|
add_subdirectory(src)
|
||||||
|
|||||||
@@ -84,18 +84,6 @@ else()
|
|||||||
set(LIBURING_LIBRARIES uring)
|
set(LIBURING_LIBRARIES uring)
|
||||||
endif (${WITH_SYSTEM_LIBURING})
|
endif (${WITH_SYSTEM_LIBURING})
|
||||||
|
|
||||||
add_custom_target(build_tests)
|
|
||||||
add_custom_target(test
|
|
||||||
COMMAND
|
|
||||||
echo leak:tcmalloc > ${CMAKE_CURRENT_BINARY_DIR}/lsan-suppress.txt &&
|
|
||||||
env LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_BINARY_DIR}/lsan-suppress.txt ${CMAKE_CTEST_COMMAND}
|
|
||||||
)
|
|
||||||
# make -j16 -C ../../build test_heap && ../../build/src/test/test_heap
|
|
||||||
# make -j16 -C ../../build test_heap && rm -f $(find ../../build -name '*.gcda') && ctest -V -T test -T coverage -R heap --test-dir ../../build && (cd ../../build; gcovr -f ../src --html --html-nested -o coverage/index.html; cd ../src/test)
|
|
||||||
# make -j16 -C ../../build test_blockstore && rm -f $(find ../../build -name '*.gcda') && ctest -V -T test -T coverage -R blockstore --test-dir ../../build && (cd ../../build; gcovr -f ../src --html --html-nested -o coverage/index.html; cd ../src/test)
|
|
||||||
# kcov --include-path=../../../src ../../kcov ./test_blockstore
|
|
||||||
add_dependencies(test build_tests)
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
../
|
../
|
||||||
${CMAKE_SOURCE_DIR}/src/blockstore
|
${CMAKE_SOURCE_DIR}/src/blockstore
|
||||||
|
|||||||
Reference in New Issue
Block a user