From cfa700b903d57bea5c9fd42be88ad47d5bd40c0b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 20:03:34 +0200 Subject: Adding upstream version 3.118. Signed-off-by: Daniel Baumann --- testsuite/runsuite.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 testsuite/runsuite.sh (limited to 'testsuite/runsuite.sh') diff --git a/testsuite/runsuite.sh b/testsuite/runsuite.sh new file mode 100755 index 0000000..03099b7 --- /dev/null +++ b/testsuite/runsuite.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +FAILED="" + +PASSWD_BAK="./passwd.backup" + + +if [ "$(id -u)" != "0" ]; then + echo "root needed" + exit 1 +fi + +cp /etc/passwd $PASSWD_BAK + +for a in off on; do + for i in ./test*.pl ; do + if ! shadowconfig $a > /dev/null; then + echo "shadowconfig $a failed" + exit 1 + fi + echo + echo "Starting $i (shadow $a)" + /usr/bin/perl -I. $i + if [ "$?" != "0" ]; then + FAILED="$FAILED $i($a)" + fi + done +done + +if [ -z "$FAILED" ]; then + echo "All tests passed successfully" + rm $PASSWD_BAK + exit 0 +else + echo "tests $FAILED failed" + echo "see $PASSWD_BAK for a copy of /etc/passwd before starting" + exit 1 +fi + -- cgit v1.2.3