2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Merge branch 'mnowak/add-unit-gcc-out-of-tree-ci-job' into 'main'

Add unit:gcc:out-of-tree CI job

See merge request isc-projects/bind9!4740
This commit is contained in:
Michal Nowak
2021-05-14 12:21:06 +00:00
2 changed files with 34 additions and 9 deletions

View File

@@ -238,6 +238,18 @@ stages:
grep "^#define HAVE_READLINE_READLINE" config.h; \
fi
# Move the out-of-tree workspace to CI project dir to save it for use in
# dependent jobs.
.save_out_of_tree_workspace: &save_out_of_tree_workspace
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
# Move the artifacts from the out-of-tree build job to their original
# location (the out-of-tree workspace) and then continue work in the
# out-of-tree workspace.
.retrieve_out_of_tree_workspace: &retrieve_out_of_tree_workspace
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "$(basename "${OUT_OF_TREE_WORKSPACE}")" "${OUT_OF_TREE_WORKSPACE}"
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
.build: &build_job
<<: *default_triggering_rules
stage: build
@@ -253,7 +265,7 @@ stages:
- if [[ "${CFLAGS}" == *"-fsanitize=address"* ]]; then ( ! grep -F AddressSanitizer config.log ); fi
- if test -z "${OUT_OF_TREE_WORKSPACE}" && test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
after_script:
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
- *save_out_of_tree_workspace
needs:
- job: autoreconf
artifacts: true
@@ -304,10 +316,7 @@ stages:
stage: system
before_script:
- *setup_softhsm
# Move the artifacts from the out-of-tree build job to their original location (the out-of-tree workspace).
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "$(basename "${OUT_OF_TREE_WORKSPACE}")" "${OUT_OF_TREE_WORKSPACE}"
# Continue work in the out-of-tree workspace.
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
- *retrieve_out_of_tree_workspace
- *setup_interfaces
script:
- cd bin/tests/system
@@ -317,7 +326,7 @@ stages:
- test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
- test -d bind-* && cd bind-*
- cat bin/tests/system/test-suite.log
- test -n "${OUT_OF_TREE_WORKSPACE}" && mv "${OUT_OF_TREE_WORKSPACE}" "${CI_PROJECT_DIR}"
- *save_out_of_tree_workspace
.system_test: &system_test_job
<<: *system_test_common
@@ -370,8 +379,11 @@ stages:
before_script:
- if [ -n "$TCP_CONNECTIONTIMEOUT" ]; then sudo sysctl 'net.inet.tcp.keepinittime=1'; fi
- *setup_softhsm
- *retrieve_out_of_tree_workspace
script:
- make -j${TEST_PARALLEL_JOBS:-1} -k unit V=1
after_script:
- *save_out_of_tree_workspace
.unit_test: &unit_test_job
<<: *unit_test_common
@@ -775,6 +787,19 @@ system:gcc:out-of-tree:
- tags
- web
unit:gcc:out-of-tree:
variables:
OUT_OF_TREE_WORKSPACE: /tmp/out_of_tree_workspace
needs:
- job: gcc:out-of-tree
artifacts: true
<<: *base_image
<<: *unit_test_job
only:
- schedules
- tags
- web
# Jobs for tarball GCC builds on Debian 10 "buster" (amd64)
gcc:tarball:

View File

@@ -59,15 +59,15 @@ CLEANFILES = $(EXTRA_master_test_DEPENDENCIES)
testdata/master/master12.data: testdata/master/master12.data.in
mkdir -p testdata/master
$(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master12.data.in > $@
$(PERL) -w $(srcdir)/mkraw.pl < $(srcdir)/testdata/master/master12.data.in > $@
testdata/master/master13.data: testdata/master/master13.data.in
mkdir -p testdata/master
$(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master13.data.in > $@
$(PERL) -w $(srcdir)/mkraw.pl < $(srcdir)/testdata/master/master13.data.in > $@
testdata/master/master14.data: testdata/master/master14.data.in
mkdir -p testdata/master
$(PERL) -w $(srcdir)/mkraw.pl < testdata/master/master14.data.in > $@
$(PERL) -w $(srcdir)/mkraw.pl < $(srcdir)/testdata/master/master14.data.in > $@
endif