Commit d96c94d7 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

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.
parent d016ea74
......@@ -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:
......
......@@ -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])]
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment