Skip to content
Snippets Groups Projects
Commit 055b51e7 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Merge branch 'develop' of gitlab.delpinux.fr:code/pastis into develop

parents 33271298 8c333332
No related branches found
No related tags found
No related merge requests found
image: localhost:5000/ubuntu_gcc
#before_script:
# - apt-get update
# - apt-get -y install cmake g++-7 gcovr bc
# - apt-get -y upgrade
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- build/
untracked: true
stages:
- build
- test
- deploy
build:
stage: build
script:
- mkdir -p build
- cd build
- CXX=g++-7 CC=gcc-7 cmake .. -DCMAKE_BUILD_TYPE=Coverage
- make pastis
tests:
stage: test
script:
- ls > /dev/null # seems necessary to ensure build is here...
- cd build
- make unit_tests
- make coverage-report
pages:
stage: deploy
dependencies:
- tests
script:
- ls > /dev/null # seems necessary to ensure build is here...
- rm -rf public/
- mv build/coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
Pipelines
=========
> [![build status](https://gitlab.delpinux.fr/code/pastis/badges/develop/build.svg)](https://gitlab.delpinux.fr/code/pastis/pipelines)
[![coverage report](https://gitlab.delpinux.fr/code/pastis/badges/develop/coverage.svg)](https://gitlab.delpinux.fr/code/pastis/commits/develop)
[`develop`](https://gitlab.delpinux.fr/code/pastis/tree/develop)
> [![build status](https://gitlab.delpinux.fr/code/pastis/badges/master/build.svg)](https://gitlab.delpinux.fr/code/pastis/pipelines)
[![coverage report](https://gitlab.delpinux.fr/code/pastis/badges/master/coverage.svg)](https://gitlab.delpinux.fr/code/pastis/commits/master)
[`master`](https://gitlab.delpinux.fr/code/pastis/tree/master)
Appetizer
=========
......
include_directories("${CATCH_INCLUDE_PATH}")
include_directories("${PASTIS_BINARY_DIR}/src/utils")
set(EXECUTABLE_OUTPUT_PATH ${PASTIS_BINARY_DIR})
add_executable (unit_tests
test_main.cpp
test_PastisAssert.cpp
test_RevisionInfo.cpp
test_TinyMatrix.cpp
test_TinyVector.cpp)
test_TinyVector.cpp
)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
target_link_libraries (
unit_tests
target_link_libraries (unit_tests
PastisUtils
Catch)
Catch
)
enable_testing()
......
......@@ -2,6 +2,13 @@
#include <RevisionInfo.hpp>
#include <pastis_git_revision.hpp>
TEST_CASE("RevisionInfo", "[utils]") {
REQUIRE(RevisionInfo::hasGitInfo() == true);
#ifdef HAS_PASTIS_GIT_INFO
#define HAS_GIT_INFO true
#else
#define HAS_GIT_INFO false
#endif
REQUIRE( (RevisionInfo::hasGitInfo() == HAS_GIT_INFO) );
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment