mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 07:53:31 +01:00
run unit tests with cmake's test target
This commit is contained in:
parent
0111725d48
commit
24ce100696
@ -278,6 +278,8 @@ if (POD2MAN)
|
|||||||
endif (POD2MAN)
|
endif (POD2MAN)
|
||||||
|
|
||||||
if (BUILD_UNIT_TESTS)
|
if (BUILD_UNIT_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
message("-- Including vendored googletest")
|
message("-- Including vendored googletest")
|
||||||
set(GOOGLETEST_DIR vendor/github.com/google/googletest)
|
set(GOOGLETEST_DIR vendor/github.com/google/googletest)
|
||||||
add_subdirectory(${GOOGLETEST_DIR})
|
add_subdirectory(${GOOGLETEST_DIR})
|
||||||
@ -292,6 +294,7 @@ if (BUILD_UNIT_TESTS)
|
|||||||
file(GLOB_RECURSE TEST_SOURCES "encfs/*_test.cpp")
|
file(GLOB_RECURSE TEST_SOURCES "encfs/*_test.cpp")
|
||||||
add_executable (unittests ${TEST_SOURCES})
|
add_executable (unittests ${TEST_SOURCES})
|
||||||
target_link_libraries(unittests gtest gtest_main encfs)
|
target_link_libraries(unittests gtest gtest_main encfs)
|
||||||
|
add_test(unit unittests)
|
||||||
|
|
||||||
file(GLOB_RECURSE BENCH_SOURCES "encfs/*_bench.cpp")
|
file(GLOB_RECURSE BENCH_SOURCES "encfs/*_bench.cpp")
|
||||||
add_executable (benchmarks ${BENCH_SOURCES})
|
add_executable (benchmarks ${BENCH_SOURCES})
|
||||||
|
@ -10,5 +10,5 @@ dependencies:
|
|||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
- bash ./ci/config.sh
|
- bash ./ci/config.sh
|
||||||
- cd build && make && ./checkops && make install
|
- cd build && make && make test && ./checkops && make install
|
||||||
- /tmp/encfs/bin/encfsctl --version
|
- /tmp/encfs/bin/encfsctl --version
|
||||||
|
Loading…
Reference in New Issue
Block a user