From 6b5426e1a7e19e4e39848a362c3dce80b40243b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 15 Oct 2019 16:38:04 +0200 Subject: [PATCH 1/2] Work around an OpenBSD "make" quirk Consider the following Makefile: foo: false On OpenBSD, the following happens for this Makefile: - "make foo" returns 1, - "make -k foo" returns 0, - "make -k -j6 foo" returns 1. However, if the .NOTPARALLEL pseudo-target is added to this Makefile, "make -k -j6 foo" will return 0 as well. Since bin/tests/Makefile contains the .NOTPARALLEL pseudo-target, running "make -k -j6 test" from bin/tests/ on OpenBSD prevents any errors from being reported through that command's exit code. Work around the issue by running "make -k -j6 test" in the bin/tests/system/ directory instead as bin/tests/system/Makefile does not contain the .NOTPARALLEL pseudo-target and thus things work as expected there. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc49880eb0..e5120c5e9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,7 +193,7 @@ stages: - *setup_interfaces - *setup_softhsm script: - - ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) + - ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) - test -s bin/tests/system/systests.output artifacts: untracked: true From 07d2fcb5441960c508f5f36662f7c3acc5b98be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Tue, 15 Oct 2019 16:38:04 +0200 Subject: [PATCH 2/2] Add OpenBSD to GitLab CI Ensure BIND can be tested on OpenBSD in GitLab CI to more quickly catch build and test errors on that operating system. Some notes: - While GCC is packaged for OpenBSD, only old versions (4.2.1, 4.9.4) are readily available and none of them is the default system compiler, so we are only doing Clang builds in GitLab CI. - Unit tests are currently not run on OpenBSD because it ships with an old version of kyua which does not handle skipped tests properly. These jobs will be added when we move away from using kyua in the future as the test code itself works fine. - All OpenBSD jobs are run inside QEMU virtual machines, using GitLab Runner Custom executor. --- .gitlab-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5120c5e9b..b9ec003c69 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ stages: ### Runner Tag Templates -# Note: FreeBSD runners extract the FreeBSD version to use from job name +# Note: BSD runners extract the operating system version to use from job name .freebsd-amd64: &freebsd_amd64 tags: @@ -45,6 +45,11 @@ stages: - linux - i386 +.openbsd-amd64: &openbsd_amd64 + tags: + - openbsd + - amd64 + ### Docker Image Templates # Alpine Linux @@ -763,6 +768,21 @@ unit:clang:freebsd12.0:amd64: - clang:freebsd12.0:amd64 needs: ["clang:freebsd12.0:amd64"] +# Jobs for Clang builds on OpenBSD 6.5 (amd64) + +clang:openbsd6.5:amd64: + variables: + CC: clang + <<: *openbsd_amd64 + <<: *build_job + +system:clang:openbsd6.5:amd64: + <<: *openbsd_amd64 + <<: *system_test_job + dependencies: + - clang:openbsd6.5:amd64 + needs: ["clang:openbsd6.5:amd64"] + # Jobs with libtool disabled nolibtool:sid:amd64: