File: test.script

package info (click to toggle)
openslp-dfsg 1.2.1-7.5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,556 kB
  • ctags: 2,620
  • sloc: ansic: 21,723; sh: 9,326; yacc: 597; lex: 335; makefile: 286
file content (19 lines) | stat: -rwxr-xr-x 674 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

echo "SLPReg"
rm -f SLPReg.actual.output
scriptdir=${srcdir}/SLPReg

test -f ${srcdir}/slpd.pid && kill `cat ${srcdir}/slpd.pid` && rm ${srcdir}/slpd.pid
../slpd/slpd -p ${srcdir}/slpd.pid -l ${srcdir}/slpd.log
RESULT=$?
if test $RESULT != 0; then
    echo "Unable to start slpd (error = $RESULT), test failed."
    exit $RESULT
fi

./testslpreg service:valid 10.0.0.1 service:valid >>  SLPReg.actual.output
echo >> SLPReg.actual.output
./testslpreg service:valid 10.0.0.1 service:invalid >> SLPReg.actual.output
test -f ${srcdir}/slpd.pid && kill `cat ${srcdir}/slpd.pid` && rm ${srcdir}/slpd.pid
diff -c ${scriptdir}/SLPReg.expected.output SLPReg.actual.output