From ad8f068b2e31df43dbd9cb2f759ebf5f7e6680dc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 19 Mar 2021 08:20:40 +0200 Subject: build: don't run tests as root --- check | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'check') diff --git a/check b/check index 79b73ee..4f26da1 100755 --- a/check +++ b/check @@ -30,6 +30,11 @@ sp-docgen obnam.md -o obnam.pdf sp-codegen obnam.md -o test.py rm -f test.log -$hideok python3 test.py --log test.log "$@" +if [ "$(id -un)" = root ] +then + echo Not running tests as root. +else + $hideok python3 test.py --log test.log "$@" +fi echo "Everything seems to be in order." -- cgit v1.2.1