From: Magnus Jacobsson Date: Mon, 5 Jul 2021 10:11:57 +0000 (+0200) Subject: add ctest to the Ubuntu 21.04 ASan test in CI X-Git-Tag: 2.48.0~12^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e50783ccdca0afcee1bbcb6b551d2d6cb0fff0a;p=graphviz add ctest to the Ubuntu 21.04 ASan test in CI This adds a new test template that is based on the default test template, but replaces the script section in order to be able to set up and execute ctest without affecting tests on older OSes. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3ef34db91..5e828dc70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -230,10 +230,30 @@ portable-source: except: - tags +.test_template_including_ctest: &test_definition_including_ctest + stage: test + script: + - ci/install-packages.sh + - export GV_VERSION=$( cat VERSION ) + - export OS_ID=$( cat OS_ID ) + - pushd build + - ctest --output-on-failure + - popd + - python3 -m pytest --verbose --junitxml=report.xml ci/tests.py tests rtest + artifacts: + reports: + junit: ./report.xml + except: + - tags + .linux_test_template: &linux_test_definition <<: *test_definition image: "$CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_SHA" +.linux_test_template_including_ctest: &linux_test_definition_including_ctest + <<: *test_definition_including_ctest + image: "$CI_REGISTRY_IMAGE/$IMAGE:$CI_COMMIT_SHA" + centos7-build: <<: *rpm_build_definition needs: @@ -446,6 +466,7 @@ ubuntu21-04-cmake-build: # fail on any compiler warnings - export CFLAGS=-Werror - export CXXFLAGS=-Werror + - export CMAKE_OPTIONS="-Dwith_cxx_tests=ON" - echo experimental > COLLECTION tags: - linux @@ -464,7 +485,7 @@ ubuntu21-04-cmake-ASan-build-for-ctest: # fail on any compiler warnings - export CFLAGS=-Werror - export CXXFLAGS=-Werror - - export CMAKE_OPTIONS="-Duse_sanitizers=ON" + - export CMAKE_OPTIONS="-Duse_sanitizers=ON -Dwith_cxx_tests=ON " - echo experimental > COLLECTION # override the deb_build_definition artifacts since we need more # files from the build directory when running ctest in the test @@ -798,8 +819,8 @@ ubuntu21-04-cmake-test: variables: IMAGE: ubuntu-21.04 -ubuntu21.04-cmake-ASan-test: - <<: *linux_test_definition +ubuntu21.04-cmake-ASan-test-including-ctest: + <<: *linux_test_definition_including_ctest before_script: - export build_system="cmake" - export CFLAGS=" -g -fsanitize=address,undefined"