From: Ondřej Surý Date: Mon, 15 Mar 2021 09:22:15 +0000 (+0100) Subject: Require CMocka >= 1.1.3 to run the unit tests X-Git-Tag: v9.17.12~32^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d96c94d754ce00ed40373d5195d4fad8378abe9b;p=thirdparty%2Fbind9.git Require CMocka >= 1.1.3 to run the unit tests In CMocka versions << 1.1.3, the skip() function would cause the whole unit test to abort when CMOCKA_TEST_ABORT is set. As this is problem only in Debian 9 Stretch and Ubuntu 16.04 Xenial, we just require the CMocka >= 1.1.3 and disable the unit testing on Debian 9 Stretch until we can pull the libcmocka-dev from stretch-backports and remove the Ubuntu 16.04 Xenial from the CI as it is reaching End of Standard Support at the end of April 2021. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7de6c7664b3..86fecc00ba4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,10 +143,6 @@ stages: # Ubuntu -.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image - image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64" - <<: *linux_amd64 - .ubuntu-focal-amd64: &ubuntu_focal_amd64_image image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64" <<: *linux_amd64 @@ -644,6 +640,7 @@ gcc:stretch:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON} -O2" + EXTRA_CONFIGURE: "--without-cmocka" <<: *debian_stretch_amd64_image <<: *build_job @@ -842,30 +839,6 @@ unit:gcc:tumbleweed:amd64: - job: gcc:tumbleweed:amd64 artifacts: true -# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64) - -gcc:xenial:amd64: - variables: - CC: gcc - CFLAGS: "${CFLAGS_COMMON} -O2" - EXTRA_CONFIGURE: "--disable-geoip" - <<: *ubuntu_xenial_amd64_image - <<: *build_job - -system:gcc:xenial:amd64: - <<: *ubuntu_xenial_amd64_image - <<: *system_test_job - needs: - - job: gcc:xenial:amd64 - artifacts: true - -unit:gcc:xenial:amd64: - <<: *ubuntu_xenial_amd64_image - <<: *unit_test_job - needs: - - job: gcc:xenial:amd64 - artifacts: true - # Jobs for regular GCC builds on Ubuntu 20.04 Focal Fossa (amd64) gcc:focal:amd64: diff --git a/configure.ac b/configure.ac index b5a3dc705d2..c05600872fd 100644 --- a/configure.ac +++ b/configure.ac @@ -1350,10 +1350,10 @@ AC_ARG_WITH([cmocka], AS_CASE([$with_cmocka], [no],[], - [detect],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.0], + [detect],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1.3], [AC_DEFINE([HAVE_CMOCKA], [1], [Use CMocka]) with_cmocka=yes],[with_cmocka=no])], - [yes],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.0.0], + [yes],[PKG_CHECK_MODULES([CMOCKA], [cmocka >= 1.1.3], [AC_DEFINE([HAVE_CMOCKA], [1], [Use CMocka])])], [AC_MSG_ERROR([Use PKG_CONFIG_PATH to specify path to CMocka library])] )