diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2007-05-04 11:36:08 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2007-05-04 11:36:08 +0000 |
commit | 7b33ec050402db86919da97c720dacaf280681e6 (patch) | |
tree | 14bbfca5e498fafdf67645142aa17b21f7db3159 /xtests/run-xtests.sh | |
parent | f1556b4817aecdef72ca6e60489bbf108f22e0e0 (diff) | |
download | pam-7b33ec050402db86919da97c720dacaf280681e6.tar.gz pam-7b33ec050402db86919da97c720dacaf280681e6.tar.bz2 pam-7b33ec050402db86919da97c720dacaf280681e6.zip |
Relevant BUGIDs:
Purpose of commit: bugfix
Commit summary:
---------------
2007-05-04 Thorsten Kukuk <kukuk@suse.de>
* xtests/run-xtests.sh: Use SRCDIR to find PAM config files.
* xtests/Makefile.am:Call run-xtests.sh with srcdir as first
argument.
Based on patch by Bernard Leak <thisisnotapipe@hotmail.com>.
Diffstat (limited to 'xtests/run-xtests.sh')
-rwxr-xr-x | xtests/run-xtests.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh index ce49fcda..e05e45e2 100755 --- a/xtests/run-xtests.sh +++ b/xtests/run-xtests.sh @@ -1,5 +1,9 @@ #!/bin/bash +SRCDIR=$1 +shift 1 +[ -z "${SRCDIR}" ] && SRCDIR='.' + if test `id -u` -ne 0 ; then echo "You need to be root to run the tests" exit 1 @@ -12,9 +16,9 @@ pass=0 all=0 for testname in $XTESTS ; do - install -m 644 $testname.pamd /etc/pam.d/$testname - if test -x ./$testname.sh ; then - ./$testname.sh > /dev/null + install -m 644 "${SRCDIR}"/$testname.pamd /etc/pam.d/$testname + if test -x "${SRCDIR}"/$testname.sh ; then + "${SRCDIR}"/$testname.sh > /dev/null else ./$testname > /dev/null fi |