From 24ce1006965fe4ac880e0244be3567ba3b9deacf Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Sun, 6 Aug 2017 22:26:58 -0400 Subject: [PATCH] run unit tests with cmake's test target --- CMakeLists.txt | 3 +++ circle.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fe770f..b349cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -278,6 +278,8 @@ if (POD2MAN) endif (POD2MAN) if (BUILD_UNIT_TESTS) + enable_testing() + message("-- Including vendored googletest") set(GOOGLETEST_DIR vendor/github.com/google/googletest) add_subdirectory(${GOOGLETEST_DIR}) @@ -292,6 +294,7 @@ if (BUILD_UNIT_TESTS) file(GLOB_RECURSE TEST_SOURCES "encfs/*_test.cpp") add_executable (unittests ${TEST_SOURCES}) target_link_libraries(unittests gtest gtest_main encfs) + add_test(unit unittests) file(GLOB_RECURSE BENCH_SOURCES "encfs/*_bench.cpp") add_executable (benchmarks ${BENCH_SOURCES}) diff --git a/circle.yml b/circle.yml index 133221b..04d5f28 100644 --- a/circle.yml +++ b/circle.yml @@ -10,5 +10,5 @@ dependencies: test: override: - bash ./ci/config.sh - - cd build && make && ./checkops && make install + - cd build && make && make test && ./checkops && make install - /tmp/encfs/bin/encfsctl --version