mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 12:25:17 -04:00
Merge branch 'coverage' into 'master'
Provide unit tests and coverage reports from CI See merge request OpenMW/openmw!1675
This commit is contained in:
commit
bb2a7d7996
@ -35,8 +35,8 @@ variables:
|
|||||||
- cd build
|
- cd build
|
||||||
- cmake --build . -- -j $(nproc)
|
- cmake --build . -- -j $(nproc)
|
||||||
- cmake --install .
|
- cmake --install .
|
||||||
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite; fi
|
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_test_suite --gtest_output="xml:tests.xml"; fi
|
||||||
- if [[ "${BUILD_TESTS_ONLY}" ]]; then ./openmw_detournavigator_navmeshtilescache_benchmark; fi
|
- if [[ "${BUILD_TESTS_ONLY}" && ! "${BUILD_WITH_CODE_COVERAGE}" ]]; then ./openmw_detournavigator_navmeshtilescache_benchmark; fi
|
||||||
- ccache -s
|
- ccache -s
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
@ -111,7 +111,10 @@ Ubuntu_GCC_tests:
|
|||||||
BUILD_TESTS_ONLY: 1
|
BUILD_TESTS_ONLY: 1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_GCC_tests_Debug:
|
Ubuntu_GCC_tests_Debug:
|
||||||
extends: Ubuntu_GCC
|
extends: Ubuntu_GCC
|
||||||
@ -124,7 +127,10 @@ Ubuntu_GCC_tests_Debug:
|
|||||||
CMAKE_CXX_FLAGS_DEBUG: -g -O0 -D_GLIBCXX_ASSERTIONS
|
CMAKE_CXX_FLAGS_DEBUG: -g -O0 -D_GLIBCXX_ASSERTIONS
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_GCC_tests_asan:
|
Ubuntu_GCC_tests_asan:
|
||||||
extends: Ubuntu_GCC
|
extends: Ubuntu_GCC
|
||||||
@ -139,7 +145,10 @@ Ubuntu_GCC_tests_asan:
|
|||||||
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
|
ASAN_OPTIONS: halt_on_error=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_GCC_tests_ubsan:
|
Ubuntu_GCC_tests_ubsan:
|
||||||
extends: Ubuntu_GCC
|
extends: Ubuntu_GCC
|
||||||
@ -153,7 +162,10 @@ Ubuntu_GCC_tests_ubsan:
|
|||||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_GCC_tests_tsan:
|
Ubuntu_GCC_tests_tsan:
|
||||||
extends: Ubuntu_GCC
|
extends: Ubuntu_GCC
|
||||||
@ -168,7 +180,29 @@ Ubuntu_GCC_tests_tsan:
|
|||||||
TSAN_OPTIONS: second_deadlock_stack=1:halt_on_error=1
|
TSAN_OPTIONS: second_deadlock_stack=1:halt_on_error=1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
|
Ubuntu_GCC_tests_coverage:
|
||||||
|
extends: Ubuntu_GCC_tests_Debug
|
||||||
|
cache:
|
||||||
|
key: Ubuntu_GCC_tests_coverage.v1
|
||||||
|
variables:
|
||||||
|
BUILD_WITH_CODE_COVERAGE: 1
|
||||||
|
before_script:
|
||||||
|
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic openmw-coverage
|
||||||
|
after_script:
|
||||||
|
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary --root ${CI_PROJECT_DIR} -j $(nproc) -o coverage.xml
|
||||||
|
coverage: /^\s*lines:\s*\d+.\d+\%/
|
||||||
|
artifacts:
|
||||||
|
paths: []
|
||||||
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
cobertura: coverage.xml
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_Static_Deps:
|
Ubuntu_Static_Deps:
|
||||||
extends: Ubuntu_Clang
|
extends: Ubuntu_Clang
|
||||||
@ -206,7 +240,10 @@ Ubuntu_Static_Deps_tests:
|
|||||||
CXXFLAGS: -O0
|
CXXFLAGS: -O0
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_Clang:
|
Ubuntu_Clang:
|
||||||
extends: .Ubuntu
|
extends: .Ubuntu
|
||||||
@ -230,7 +267,10 @@ Ubuntu_Clang_tests:
|
|||||||
BUILD_TESTS_ONLY: 1
|
BUILD_TESTS_ONLY: 1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
Ubuntu_Clang_tests_Debug:
|
Ubuntu_Clang_tests_Debug:
|
||||||
extends: Ubuntu_Clang
|
extends: Ubuntu_Clang
|
||||||
@ -242,7 +282,10 @@ Ubuntu_Clang_tests_Debug:
|
|||||||
CMAKE_BUILD_TYPE: Debug
|
CMAKE_BUILD_TYPE: Debug
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: []
|
paths: []
|
||||||
expire_in: 1 minute
|
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: build/tests.xml
|
||||||
|
|
||||||
.MacOS:
|
.MacOS:
|
||||||
image: macos-11-xcode-12
|
image: macos-11-xcode-12
|
||||||
|
@ -64,6 +64,12 @@ if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${BUILD_WITH_CODE_COVERAGE}" ]]; then
|
||||||
|
CMAKE_CONF_OPTS+=(
|
||||||
|
-DBUILD_WITH_CODE_COVERAGE="${BUILD_WITH_CODE_COVERAGE}"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@ declare -rA GROUPED_DEPS=(
|
|||||||
libcollada-dom-dev libfreetype6-dev libjpeg-dev libpng-dev
|
libcollada-dom-dev libfreetype6-dev libjpeg-dev libpng-dev
|
||||||
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
|
libsdl2-dev libboost-system-dev libboost-filesystem-dev libgl-dev
|
||||||
"
|
"
|
||||||
|
|
||||||
|
[openmw-coverage]="gcovr"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user