summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--tests/Makemodule.am1
-rwxr-xr-xtests/run-nonroot.sh9
3 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6a248e602..fe74e6856 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,6 +41,7 @@ dist_usrbin_exec_SCRIPTS =
systemdsystemunit_DATA =
ruman1_DATA =
check_PROGRAMS =
+TESTS =
INSTALL_EXEC_HOOKS =
UNINSTALL_HOOKS =
diff --git a/tests/Makemodule.am b/tests/Makemodule.am
index e25f71391..e7c31af23 100644
--- a/tests/Makemodule.am
+++ b/tests/Makemodule.am
@@ -10,4 +10,5 @@ EXTRA_DIST += \
clean-local-tests:
rm -rf output diff
+TESTS += tests/run-nonroot.sh
CLEAN_LOCALS += clean-local-tests
diff --git a/tests/run-nonroot.sh b/tests/run-nonroot.sh
new file mode 100755
index 000000000..150a99f3a
--- /dev/null
+++ b/tests/run-nonroot.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+MYUID=$(id -ru)
+if [ $MYUID -eq 0 ]; then
+ echo "The automatically executed tests suite is allowed for non-root users only."
+ exit 0
+fi
+
+exec $(cd $(dirname $0) && pwd)/run.sh