From 8e27acc319dca5f244366f58e75b92c78f1cc179 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Thu, 10 Dec 2020 10:51:00 +0100 Subject: [PATCH] Fix working directory for unit tests --- .gitlab-ci.yml | 7 ++++++- tests/unit/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 295c783b3..dfb0cf71e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,9 +68,13 @@ compile GekkoFS: -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} ${CI_PROJECT_DIR} - make -j$(nproc) install + # the following commands are intended to reduce artifact size + - rm -rf ${BUILD_PATH}/_deps + - find ${BUILD_PATH} -name "*.o" -delete artifacts: paths: - - ${INSTALL_PATH} + - ${BUILD_PATH} + - ${INSTALL_PATH} compile tests: stage: build @@ -98,6 +102,7 @@ integration tests: unit: stage: test script: + - cd ${BUILD_PATH} - ctest -j $(nproc) -L unit::all artifacts: when: on_failure diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index a5568fb52..29f392931 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -53,6 +53,6 @@ catch_discover_tests(tests if(GKFS_INSTALL_TESTS) install(TARGETS tests - DESTINATION ${CMAKE_INSTALL_BINDIR} + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gkfs/tests/unit ) endif() -- GitLab