File: t0002-nfsconf.sh

package info (click to toggle)
nfs-utils 1%3A2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,276 kB
  • sloc: ansic: 52,182; sh: 5,371; python: 2,151; makefile: 971
file content (38 lines) | stat: -rwxr-xr-x 605 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

TESTFILES=nfsconf
DUMPER=`realpath ../tools/nfsconf/nfsconftool`

BASEDIR=`dirname "$0"`
pushd $BASEDIR/$TESTFILES

rm -f *.out

TCOUNT=0
TPASS=0

for i in *.conf
do
TNAME=`basename "$i" .conf`

echo "Running test $TNAME"
TCOUNT=$((TCOUNT + 1))

if ! $DUMPER --file "$i" --dump - > "$TNAME.out" 2>&1
then
echo "Error running test $TNAME"
elif ! diff -u "$TNAME.exp" "$TNAME.out"
then
echo "FAIL differences detected in test $TNAME"
else
echo "PASS $TNAME"
TPASS=$((TPASS + 1))
fi

done

echo "nfsconf tests complete. $TPASS of $TCOUNT tests passed"

if [ $TPASS -lt $TCOUNT ]; then
exit 1
fi