mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Merge branch 'michal/add-freebsd-to-ci' into 'master'
Add FreeBSD to CI See merge request isc-projects/bind9!2242
This commit is contained in:
@@ -11,6 +11,7 @@ variables:
|
||||
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
|
||||
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
|
||||
|
||||
GIT_DEPTH: 1
|
||||
BUILD_PARALLEL_JOBS: 6
|
||||
TEST_PARALLEL_JOBS: 6
|
||||
|
||||
@@ -24,6 +25,13 @@ stages:
|
||||
|
||||
### Runner Tag Templates
|
||||
|
||||
# Note: FreeBSD runners extract the FreeBSD version to use from job name
|
||||
|
||||
.freebsd-amd64: &freebsd_amd64
|
||||
tags:
|
||||
- freebsd
|
||||
- amd64
|
||||
|
||||
.linux-amd64: &linux_amd64
|
||||
tags:
|
||||
- linux
|
||||
@@ -182,7 +190,7 @@ stages:
|
||||
when: on_failure
|
||||
|
||||
.kyua_report: &kyua_report_html |
|
||||
kyua report-html \
|
||||
kyua --logfile /dev/null report-html \
|
||||
--force \
|
||||
--results-file "$KYUA_RESULT" \
|
||||
--results-filter "" \
|
||||
@@ -661,6 +669,57 @@ unit:pkcs11:sid:amd64:
|
||||
- pkcs11:sid:amd64
|
||||
needs: ["pkcs11:sid:amd64"]
|
||||
|
||||
# Jobs for Clang builds on FreeBSD 11.3 (amd64)
|
||||
|
||||
clang:freebsd11.3:amd64:
|
||||
variables:
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *freebsd_amd64
|
||||
<<: *build_job
|
||||
when: manual
|
||||
|
||||
system:clang:freebsd11.3:amd64:
|
||||
<<: *freebsd_amd64
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- clang:freebsd11.3:amd64
|
||||
needs: ["clang:freebsd11.3:amd64"]
|
||||
when: manual
|
||||
|
||||
unit:clang:freebsd11.3:amd64:
|
||||
<<: *freebsd_amd64
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- clang:freebsd11.3:amd64
|
||||
needs: ["clang:freebsd11.3:amd64"]
|
||||
when: manual
|
||||
|
||||
# Jobs for Clang builds on FreeBSD 12.0 (amd64)
|
||||
|
||||
clang:freebsd12.0:amd64:
|
||||
variables:
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--enable-dnstap"
|
||||
<<: *freebsd_amd64
|
||||
<<: *build_job
|
||||
when: manual
|
||||
|
||||
system:clang:freebsd12.0:amd64:
|
||||
<<: *freebsd_amd64
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- clang:freebsd12.0:amd64
|
||||
needs: ["clang:freebsd12.0:amd64"]
|
||||
when: manual
|
||||
|
||||
unit:clang:freebsd12.0:amd64:
|
||||
<<: *freebsd_amd64
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- clang:freebsd12.0:amd64
|
||||
needs: ["clang:freebsd12.0:amd64"]
|
||||
when: manual
|
||||
|
||||
# Jobs with libtool disabled
|
||||
|
||||
nolibtool:sid:amd64:
|
||||
|
@@ -544,6 +544,9 @@
|
||||
non-blocking. */
|
||||
#undef USE_FIONBIO_IOCTL
|
||||
|
||||
/* Define if libtool is used for compilation */
|
||||
#undef USE_LIBTOOL
|
||||
|
||||
/* define if OpenSSL is used for Public-Key Cryptography */
|
||||
#undef USE_OPENSSL
|
||||
|
||||
|
3
configure
vendored
3
configure
vendored
@@ -15827,6 +15827,9 @@ $as_echo "yes" >&6; }
|
||||
LIBTOOL_MODE_LINK='--mode=link'
|
||||
LIBTOOL_MODE_UNINSTALL='--mode=uninstall'
|
||||
INSTALL_LIBRARY='${INSTALL_PROGRAM}'
|
||||
|
||||
$as_echo "#define USE_LIBTOOL 1" >>confdefs.h
|
||||
|
||||
;;
|
||||
*)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
|
@@ -669,6 +669,7 @@ case $use_libtool in
|
||||
LIBTOOL_MODE_LINK='--mode=link'
|
||||
LIBTOOL_MODE_UNINSTALL='--mode=uninstall'
|
||||
INSTALL_LIBRARY='${INSTALL_PROGRAM}'
|
||||
AC_DEFINE([USE_LIBTOOL],[1],[Define if libtool is used for compilation])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <dns/tkey.h>
|
||||
|
||||
#if LD_WRAP
|
||||
#if defined(USE_LIBTOOL) || LD_WRAP
|
||||
static isc_mem_t mock_mctx = {
|
||||
.impmagic = 0,
|
||||
.magic = ISCAPI_MCTX_MAGIC,
|
||||
@@ -84,14 +84,14 @@ __wrap_isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size) {
|
||||
__wrap_isc_mem_detach(ctxp);
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_LIBTOOL
|
||||
#if ISC_MEM_TRACKLINES
|
||||
#define FLARG , const char *file, unsigned int line
|
||||
#else
|
||||
#define FLARG
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void *
|
||||
void *
|
||||
isc__mem_get(isc_mem_t *mctx, size_t size FLARG)
|
||||
{
|
||||
UNUSED(file);
|
||||
@@ -99,7 +99,7 @@ isc__mem_get(isc_mem_t *mctx, size_t size FLARG)
|
||||
return (__wrap_isc__mem_get(mctx, size));
|
||||
}
|
||||
|
||||
__attribute__((weak)) void
|
||||
void
|
||||
isc__mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG)
|
||||
{
|
||||
UNUSED(file);
|
||||
@@ -107,22 +107,23 @@ isc__mem_put(isc_mem_t *ctx0, void *ptr, size_t size FLARG)
|
||||
__wrap_isc__mem_put(ctx0, ptr, size);
|
||||
}
|
||||
|
||||
__attribute__((weak)) void
|
||||
void
|
||||
isc_mem_attach(isc_mem_t *source0, isc_mem_t **targetp) {
|
||||
__wrap_isc_mem_attach(source0, targetp);
|
||||
}
|
||||
|
||||
__attribute__((weak)) void
|
||||
void
|
||||
isc_mem_detach(isc_mem_t **ctxp) {
|
||||
__wrap_isc_mem_detach(ctxp);
|
||||
}
|
||||
|
||||
__attribute__((weak)) void
|
||||
void
|
||||
isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG){
|
||||
UNUSED(file);
|
||||
UNUSED(line);
|
||||
__wrap_isc__mem_putanddetach(ctxp, ptr, size);
|
||||
}
|
||||
#endif /* USE_LIBTOOL */
|
||||
|
||||
static int
|
||||
_setup(void **state) {
|
||||
@@ -166,11 +167,11 @@ dns_tkeyctx_destroy_test(void **state) {
|
||||
assert_non_null(tctx);
|
||||
dns_tkeyctx_destroy(&tctx);
|
||||
}
|
||||
#endif /* LD_WRAP */
|
||||
#endif /* defined(USE_LIBTOOL) || LD_WRAP */
|
||||
|
||||
int
|
||||
main(void) {
|
||||
#if LD_WRAP
|
||||
#if defined(USE_LIBTOOL) || LD_WRAP
|
||||
const struct CMUnitTest tkey_tests[] = {
|
||||
cmocka_unit_test_teardown(dns_tkeyctx_create_test, _teardown),
|
||||
cmocka_unit_test_setup(dns_tkeyctx_destroy_test, _setup),
|
||||
@@ -186,9 +187,9 @@ main(void) {
|
||||
#endif
|
||||
};
|
||||
return (cmocka_run_group_tests(tkey_tests, NULL, NULL));
|
||||
#else /* LD_WRAP */
|
||||
print_message("1..0 # Skip tkey_test requires LD_WRAP\n");
|
||||
#endif /* LD_WRAP */
|
||||
#else /* defined(USE_LIBTOOL) || LD_WRAP */
|
||||
print_message("1..0 # Skip tkey_test requires libtool or LD_WRAP\n");
|
||||
#endif /* defined(USE_LIBTOOL) || LD_WRAP */
|
||||
}
|
||||
|
||||
#else /* CMOCKA */
|
||||
|
@@ -13,7 +13,7 @@ then
|
||||
${KYUA} -v parallelism="${TEST_PARALLEL_JOBS:-1}" --logfile kyua.log --loglevel debug test --results-file "${KYUA_RESULT:-NEW}"
|
||||
status=$?
|
||||
|
||||
${KYUA} report --results-file "${KYUA_RESULT:-LATEST}"
|
||||
${KYUA} --logfile /dev/null report --results-file "${KYUA_RESULT:-LATEST}"
|
||||
|
||||
if [ "${status}" -eq "0" ]
|
||||
then
|
||||
|
Reference in New Issue
Block a user