]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Allow system tests to run under root user when inside CI
authorPetr Špaček <pspacek@isc.org>
Fri, 14 Oct 2022 13:01:19 +0000 (15:01 +0200)
committerPetr Špaček <pspacek@isc.org>
Tue, 18 Oct 2022 11:30:16 +0000 (13:30 +0200)
https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
says variable CI_SERVER="yes" is available in all versions of Gitlab.

bin/tests/system/run.sh.in

index 41cd96910a3555d4d0272fec7a23d5450a9664bf..212e9ee4f13e12fda3f981aa4d1485d2107ff4ca 100644 (file)
@@ -22,7 +22,7 @@ srcdir=@abs_srcdir@
 # shellcheck source=conf.sh
 . ${builddir}/conf.sh
 
-if [ "$(id -u)" -eq "0" ] && [ "@DEVELOPER_MODE@" != "yes" ]; then
+if [ "$CI_SERVER" != "yes" ] && [ "$(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