diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 16:26:05 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 17:26:38 -0800 |
commit | 9c52e721044e7501c3d4567b36d222dc7326224a (patch) | |
tree | 9011790770130c60a712a6f125ad50d60e07cc74 /Linux-PAM/xtests/run-xtests.sh | |
parent | 9727ff2a3fa0e94a42b34a579027bacf4146d571 (diff) | |
parent | 186ff16e8d12ff15d518000c17f115ccab5275a4 (diff) |
New upstream version 1.0.1
Diffstat (limited to 'Linux-PAM/xtests/run-xtests.sh')
-rwxr-xr-x | Linux-PAM/xtests/run-xtests.sh | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/Linux-PAM/xtests/run-xtests.sh b/Linux-PAM/xtests/run-xtests.sh deleted file mode 100755 index 4e981858..00000000 --- a/Linux-PAM/xtests/run-xtests.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/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 -fi - -XTESTS="$@" - -failed=0 -pass=0 -skiped=0 -all=0 - -mkdir -p /etc/security -cp /etc/security/access.conf /etc/security/access.conf-pam-xtests -install -m 644 "${SRCDIR}"/access.conf /etc/security/access.conf -cp /etc/security/group.conf /etc/security/group.conf-pam-xtests -install -m 644 "${SRCDIR}"/group.conf /etc/security/group.conf -cp /etc/security/limits.conf /etc/security/limits.conf-pam-xtests -install -m 644 "${SRCDIR}"/limits.conf /etc/security/limits.conf -for testname in $XTESTS ; do - for cfg in "${SRCDIR}"/$testname*.pamd ; do - install -m 644 $cfg /etc/pam.d/$(basename $cfg .pamd) - done - if test -x "${SRCDIR}"/$testname.sh ; then - "${SRCDIR}"/$testname.sh > /dev/null - else - ./$testname > /dev/null - fi - RETVAL=$? - if test $RETVAL -eq 77 ; then - echo "SKIP: $testname" - skiped=`expr $skiped + 1` - elif test $RETVAL -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 -mv /etc/security/access.conf-pam-xtests /etc/security/access.conf -mv /etc/security/group.conf-pam-xtests /etc/security/group.conf -mv /etc/security/limits.conf-pam-xtests /etc/security/limits.conf -if test "$failed" -ne 0; then - echo "===================" - echo "$failed of $all tests failed" - echo "$skiped tests not run" - echo "===================" - exit 1 -else - echo "==================" - echo "$all tests passed" - echo "$skiped tests not run" - echo "==================" -fi -exit 0 |