From: Karel Zak Date: Mon, 30 Jul 2012 16:19:20 +0000 (+0200) Subject: build-sys: add run.sh to make check for non-root users X-Git-Tag: v2.22-rc2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc22bff04b90709b7c68b3d3206e79c09efb664d;p=thirdparty%2Futil-linux.git build-sys: add run.sh to make check for non-root users Signed-off-by: Karel Zak --- diff --git a/Makefile.am b/Makefile.am index 6a248e6025..fe74e68564 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 e25f71391a..e7c31af23f 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 0000000000..150a99f3a6 --- /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