mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 09:32:08 -04:00
Merge branch 'michal/only-run-system-tests-as-root-in-developer-mode' into 'main'
Only run system tests as root in developer mode See merge request isc-projects/bind9!3894
This commit is contained in:
commit
6237be992f
3 changed files with 10 additions and 1 deletions
|
|
@ -20,6 +20,11 @@ srcdir=@abs_srcdir@
|
|||
# shellcheck source=conf.sh
|
||||
. ${builddir}/conf.sh
|
||||
|
||||
if [ "$(id -u)" -eq "0" ] && [ "@DEVELOPER_MODE@" != "yes" ]; then
|
||||
echofail "Refusing to run test as root. Build with --enable-developer to override." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SYSTEMTESTTOP="$(cd -P -- "${builddir}" && pwd -P)"
|
||||
if [ "$CYGWIN" ]; then
|
||||
SYSTEMTESTTOP="$(cygpath -m "${SYSTEMTESTTOP}")"
|
||||
|
|
|
|||
|
|
@ -159,7 +159,8 @@ AC_ARG_ENABLE([developer],
|
|||
[enable developer build settings])])
|
||||
|
||||
AS_IF([test "$enable_developer" = "yes"],
|
||||
[STD_CPPFLAGS="$STD_CPPFLAGS -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1"
|
||||
[DEVELOPER_MODE=yes
|
||||
STD_CPPFLAGS="$STD_CPPFLAGS -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1"
|
||||
test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
|
||||
test "${enable_querytrace+set}" = set || enable_querytrace=yes
|
||||
test "${with_cmocka+set}" = set || with_cmocka=yes
|
||||
|
|
@ -168,6 +169,7 @@ AS_IF([test "$enable_developer" = "yes"],
|
|||
test "${enable_warn_error+set}" = set || enable_warn_error=yes
|
||||
])
|
||||
|
||||
AC_SUBST([DEVELOPER_MODE])
|
||||
AC_SUBST([STD_CFLAGS])
|
||||
AC_SUBST([STD_CPPFLAGS])
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ my @substdefp = ();
|
|||
my %configtest;
|
||||
|
||||
my @substtest = ("CRYPTO",
|
||||
"DEVELOPER_MODE",
|
||||
"DNSTAP",
|
||||
"FSTRM_CAPTURE",
|
||||
"JSONSTATS",
|
||||
|
|
@ -722,6 +723,7 @@ sub myenable {
|
|||
# enable-developer expansion now
|
||||
|
||||
if ($enable_developer eq "yes") {
|
||||
$configtest{"DEVELOPER_MODE"} = "yes";
|
||||
$configdefh{"ISC_LIST_CHECKINIT"} = 1;
|
||||
$enable_querytrace = "yes";
|
||||
# no atf on WIN32
|
||||
|
|
|
|||
Loading…
Reference in a new issue