From ddf46056ca6afa6352c360be4a0d7e336f2b6fd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Fri, 14 Oct 2022 15:01:19 +0200 Subject: [PATCH] Allow system tests to run under root user when inside CI 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/run.sh.in b/bin/tests/system/run.sh.in index 41cd96910a3..212e9ee4f13 100644 --- a/bin/tests/system/run.sh.in +++ b/bin/tests/system/run.sh.in @@ -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 -- 2.47.3