diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 954615776642f744e9dfdbaacba9088840da4090..09936820642852b0f9b0949dd6abb40faa94a3bc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ build:
   artifacts:
     paths:
       - build/test.log.gz
-    when: always
+    when: on_failure
     reports:
       junit:
         - build/test_outputs/junit*.xml
diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt
index 47a7a495c8fb2713a37454a6432e96ac831a6ac2..00de097e7fe6bdeadb4262ab52d62224e91432af 100644
--- a/Documentation/Examples/CMakeLists.txt
+++ b/Documentation/Examples/CMakeLists.txt
@@ -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)