ci: Add a junit output to test_suite and give it to gitlab

This commit is contained in:
louiz’
2019-09-17 11:26:12 +02:00
parent 26d9445029
commit 0508a44897
2 changed files with 12 additions and 6 deletions
+7 -4
View File
@@ -131,8 +131,11 @@ build:no_db_botan:
- docker - docker
script: script:
- cd build/ - cd build/
- make check -j$(nproc || echo 1) - make check_junit || true; make check;
- make e2e -j$(nproc || echo 1) - make e2e
artifacts:
reports:
junit: ["build/check_result.xml"]
test:debian: test:debian:
extends: .basic_test extends: .basic_test
@@ -146,8 +149,8 @@ test:fedora:
image: docker.louiz.org/louiz/biboumi/test-fedora:latest image: docker.louiz.org/louiz/biboumi/test-fedora:latest
script: script:
- cd build/ - cd build/
- make coverage_check -j$(nproc || echo 1) - make coverage_check
- make coverage_e2e -j$(nproc || echo 1) - make coverage_e2e
- make coverage - make coverage
dependencies: dependencies:
- build:fedora - build:fedora
+5 -2
View File
@@ -313,6 +313,8 @@ endif()
# #
add_custom_target(check COMMAND "test_suite" add_custom_target(check COMMAND "test_suite"
DEPENDS test_suite) DEPENDS test_suite)
add_custom_target(check_junit COMMAND test_suite -r junit -o check_result.xml
DEPENDS test_suite)
set_target_properties(check PROPERTIES EXCLUDE_FROM_ALL TRUE) set_target_properties(check PROPERTIES EXCLUDE_FROM_ALL TRUE)
add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/" add_custom_target(e2e COMMAND "python3" "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/"
DEPENDS biboumi) DEPENDS biboumi)
@@ -323,13 +325,14 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
include(CodeCoverage) include(CodeCoverage)
SETUP_TARGET_FOR_COVERAGE(coverage_check SETUP_TARGET_FOR_COVERAGE(coverage_check
./test_suite ./test_suite
coverage_test_suite) coverage_test_suite
"-r junit -o check_result.xml")
add_dependencies(coverage_check test_suite) add_dependencies(coverage_check test_suite)
SETUP_TARGET_FOR_COVERAGE(coverage_e2e SETUP_TARGET_FOR_COVERAGE(coverage_e2e
python3 python3
coverage_e2e coverage_e2e
${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/) "${CMAKE_CURRENT_SOURCE_DIR}/tests/end_to_end/")
add_dependencies(coverage_e2e biboumi) add_dependencies(coverage_e2e biboumi)
ADD_CUSTOM_TARGET(coverage ADD_CUSTOM_TARGET(coverage