IAP GITLAB

Skip to content
Snippets Groups Projects
Commit e161a9be authored by Ralf Ulrich's avatar Ralf Ulrich
Browse files

Merge branch '113_test-reports' into 'master'

113 test reports

See merge request !45
parents 54d91e47 42f023f3
No related branches found
No related tags found
No related merge requests found
Showing
with 37 additions and 99 deletions
image: ubuntu:bionic
variables:
GIT_SSL_NO_VERIFY: "1"
before_script:
- apt-get update --yes
- apt-get install --yes cmake libboost-dev libeigen3-dev python3 gfortran
build:
stage: build
tags:
- run1
script:
- mkdir build
- cd build
- cmake ..
- cmake --build .
- ctest -V
# code_quality:
# image: docker:stable
# variables:
# DOCKER_DRIVER: overlay2
# allow_failure: true
# services:
# - docker:stable-dind
# script:
# - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
# - docker run
# --env SOURCE_CODE="$PWD"
# --volume "$PWD":/code
# --volume /var/run/docker.sock:/var/run/docker.sock
# "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
# artifacts:
# reports:
# codequality: gl-code-quality-report.json
......@@ -17,13 +17,15 @@ build:
- cd build
- cmake ..
- cmake --build .
- ctest -V >& test.log
- ctest -j4 -V >& test.log
- gzip -9 test.log
artifacts:
paths:
- build/test.log.gz
when: on_failure
reports:
junit:
- build/test_outputs/junit*.xml
pages:
stage: build
......
......@@ -78,3 +78,14 @@ macro (CORSIKA_ADD_FILES_ABSOLUTE varname)
set ("${varname}" "${${varname}}" PARENT_SCOPE)
endif()
endmacro(CORSIKA_ADD_FILES_ABSOLUTE)
#
# central macro to activate unit tests in cmake
#
function (CORSIKA_ADD_TEST name)
file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_outputs/)
add_test (NAME ${name} COMMAND ${name} -o ${PROJECT_BINARY_DIR}/test_outputs/junit-${name}.xml -r junit)
endfunction (CORSIKA_ADD_TEST)
......@@ -2,24 +2,24 @@ add_executable (helix_example helix_example.cc)
target_compile_options(helix_example PRIVATE -g) # do not skip asserts
target_link_libraries(helix_example CORSIKAgeometry CORSIKAunits)
install (TARGETS helix_example DESTINATION share/examples)
add_test(helix_example helix_example)
CORSIKA_ADD_TEST (helix_example)
add_executable (geometry_example geometry_example.cc)
target_compile_options(geometry_example PRIVATE -g) # do not skip asserts
target_link_libraries (geometry_example CORSIKAgeometry CORSIKAunits)
install (TARGETS geometry_example DESTINATION share/examples)
add_test(geometry_example geometry_example)
CORSIKA_ADD_TEST (geometry_example)
add_executable (logger_example logger_example.cc)
target_compile_options(logger_example PRIVATE -g) # do not skip asserts
target_link_libraries (logger_example CORSIKAunits CORSIKAlogging)
install (TARGETS logger_example DESTINATION share/examples)
add_test(logger_example logger_example)
CORSIKA_ADD_TEST (logger_example)
add_executable (stack_example stack_example.cc)
target_compile_options(stack_example PRIVATE -g) # do not skip asserts
target_link_libraries (stack_example SuperStupidStack CORSIKAunits CORSIKAlogging)
add_test(stack_example stack_example)
CORSIKA_ADD_TEST (stack_example)
add_executable (cascade_example cascade_example.cc)
target_compile_options(cascade_example PRIVATE -g) # do not skip asserts
......@@ -36,7 +36,7 @@ target_link_libraries (cascade_example SuperStupidStack CORSIKAunits CORSIKAlogg
CORSIKAprocesssequence
)
install (TARGETS cascade_example DESTINATION share/examples)
add_test(cascade_example cascade_example)
CORSIKA_ADD_TEST (cascade_example)
add_executable (staticsequence_example staticsequence_example.cc)
target_compile_options(staticsequence_example PRIVATE -g) # do not skip asserts
......@@ -46,4 +46,4 @@ target_link_libraries (staticsequence_example
CORSIKAgeometry
CORSIKAlogging)
install (TARGETS staticsequence_example DESTINATION share/examples)
add_test(staticsequence_example staticsequence_example)
CORSIKA_ADD_TEST (staticsequence_example)
......@@ -48,6 +48,4 @@ target_link_libraries (
CORSIKAenvironment
CORSIKAthirdparty # for catch2
)
add_test (NAME testGeometry COMMAND testGeometry)
CORSIKA_ADD_TEST(testGeometry)
......@@ -59,8 +59,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (
NAME testCascade
COMMAND testCascade
)
CORSIKA_ADD_TEST(testStackInterface)
......@@ -69,5 +69,4 @@ target_link_libraries (
CORSIKAthirdparty # for catch2
)
add_test (NAME testGeometry COMMAND testGeometry)
CORSIKA_ADD_TEST(testGeometry)
......@@ -47,9 +47,5 @@ target_link_libraries (
CORSIKAlogging
CORSIKAthirdparty # for catch2
)
add_test (
NAME testLogging
COMMAND testLogging
)
CORSIKA_ADD_TEST (testLogging)
......@@ -92,11 +92,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (
NAME
testParticles
COMMAND
testParticles
)
CORSIKA_ADD_TEST(testParticles)
......@@ -48,8 +48,4 @@ target_link_libraries (
CORSIKAprocesssequence
CORSIKAthirdparty # for catch2
)
add_test (
NAME testProcessSequence
COMMAND testProcessSequence
)
CORSIKA_ADD_TEST(testProcessSequence)
......@@ -45,6 +45,4 @@ target_link_libraries (
CORSIKArandom
CORSIKAthirdparty # for catch2
)
add_test (NAME testRandom COMMAND testRandom)
CORSIKA_ADD_TEST(testRandom)
......@@ -33,5 +33,5 @@ install (
#code testing
add_executable (testStackInterface testStackInterface.cc)
add_test(NAME testStackInterface COMMAND testStackInterface)
target_link_libraries (testStackInterface CORSIKAstackinterface CORSIKAthirdparty) # for catch2
CORSIKA_ADD_TEST(testStackInterface)
......@@ -22,5 +22,4 @@ install (FILES ${CORSIKAunits_HEADERS} DESTINATION include/${CORSIKAunits_NAMESP
# code testing
add_executable (testUnits testUnits.cc)
target_link_libraries (testUnits CORSIKAunits CORSIKAthirdparty) # for catch2
add_test(NAME testUnits COMMAND testUnits)
CORSIKA_ADD_TEST(testUnits)
......@@ -58,6 +58,5 @@ target_link_libraries (
CORSIKAutilities
CORSIKAthirdparty # for catch2
)
add_test (NAME testCOMBoost COMMAND testCOMBoost)
CORSIKA_ADD_TEST(testCOMBoost)
......@@ -60,6 +60,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (NAME testNullModel COMMAND testNullModel)
CORSIKA_ADD_TEST(testNullModel)
......@@ -102,6 +102,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (NAME testSibyll COMMAND testSibyll)
CORSIKA_ADD_TEST(testSibyll)
......@@ -60,6 +60,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (NAME testStackInspector COMMAND testStackInspector)
CORSIKA_ADD_TEST(testStackInspector)
......@@ -60,6 +60,5 @@ install (
# CORSIKAunits
# CORSIKAthirdparty # for catch2
# )
#add_test (NAME testNullModel COMMAND testNullModel)
# CORSIKA_ADD_TEST(testNullModel)
......@@ -37,5 +37,4 @@ target_link_libraries (
CORSIKAgeometry
CORSIKAthirdparty # for catch2
)
add_test (NAME testTrackingLine COMMAND testTrackingLine)
CORSIKA_ADD_TEST(testTrackingLine)
......@@ -44,8 +44,4 @@ target_link_libraries (
CORSIKAunits
CORSIKAthirdparty # for catch2
)
add_test (
NAME testSuperStupidStack
COMMAND testSuperStupidStack
)
CORSIKA_ADD_TEST(testSuperStupidStack)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment