summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-19 06:21:06 +0000
committerLars Wirzenius <liw@liw.fi>2021-03-19 06:21:06 +0000
commitbf5a34fc57523be8606b61784a43b89c4b82559d (patch)
tree73ee22ff6dd0221ab9b09062ab2dfc015cf56a50
parent85e2c171ed3b6af9586d14e33241c026a3123b0c (diff)
parentad8f068b2e31df43dbd9cb2f759ebf5f7e6680dc (diff)
downloadobnam2-bf5a34fc57523be8606b61784a43b89c4b82559d.tar.gz
Merge branch 'no-tests-for-root' into 'main'
build: don't run tests as root See merge request larswirzenius/obnam!119
-rwxr-xr-xcheck7
-rwxr-xr-xdebian/rules3
2 files changed, 7 insertions, 3 deletions
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."
diff --git a/debian/rules b/debian/rules
index d6aee88..ecfca56 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,5 +12,4 @@ override_dh_auto_install:
find debian/obnam/bin -type f ! -name 'obnam*' -delete
override_dh_auto_test:
- echo not running ./check in Debian package build
- echo tests need too much infra in test environment
+ ./check