diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
commit | d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c (patch) | |
tree | ba5654cffacfd2002eefc5bc3764a7971afff1dc /Linux-PAM/xtests/run-xtests.sh | |
parent | 4c51da22e068907adb7857d50f5109a467c94d7c (diff) | |
parent | 7cbfa335c57d068d59508c844f3957165cccfb9b (diff) | |
download | pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.gz pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.bz2 pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.zip |
New upstream version 0.99.7.1
Diffstat (limited to 'Linux-PAM/xtests/run-xtests.sh')
-rwxr-xr-x | Linux-PAM/xtests/run-xtests.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Linux-PAM/xtests/run-xtests.sh b/Linux-PAM/xtests/run-xtests.sh new file mode 100755 index 00000000..9c8c3571 --- /dev/null +++ b/Linux-PAM/xtests/run-xtests.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +if test `id -u` -ne 0 ; then + echo "You need to be root to run the tests" + exit 1 +fi + +XTESTS="tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \ + tst-pam_dispatch4 tst-pam_cracklib1" + +failed=0 +pass=0 +all=0 + +for testname in $XTESTS ; do + install -m 644 $testname.pamd /etc/pam.d/$testname + ./$testname > /dev/null + if test $? -ne 0 ; then + echo "FAIL: $testname" + failed=`expr $failed + 1` + else + echo "PASS: $testname" + pass=`expr $pass + 1` + fi + all=`expr $all + 1` + rm -f /etc/pam.d/$testname + done + if test "$failed" -ne 0; then + echo "===================" + echo "$failed of $all tests failed" + echo "===================" + exit 1 + else + echo "==================" + echo "All $all tests passed" + echo "==================" + fi +exit 0 |