File: test0.sh

package info (click to toggle)
tripwire 1.2-15
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 1,428 kB
  • ctags: 866
  • sloc: ansic: 7,938; sh: 1,316; makefile: 425; yacc: 413; lex: 133; perl: 101
file content (36 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

# $Id: test0.sh,v 1.5 1993/12/12 01:39:09 genek Exp $ 

SIGGEN=$1
TESTDIR=$2
TEMPFILE=$3
TEST0KEY=$4
ME=$0

cat << GHK
=== $ME: DESCRIPTION

    This shell script exercises all the signature routines included in
the Tripwire distribution.  This suite is run on a series of files
created by the authors of the signature routines.

GHK

echo "=== $ME: BEGIN ==="

./createfiles $TESTDIR
rm -rf $TESTDIR/CVS
$SIGGEN -h $TESTDIR/* > $TEMPFILE
diff $TEMPFILE $TEST0KEY 
if [ $? -eq 0 ] 
then
    touch OKSIGS && rm $TEMPFILE 
    echo "=== $ME: PASS ==="
    exit 0
else
    echo Signatures do not match!  File $TEMPFILE should match $TEST0KEY.  Aborting... 
    echo "=== $ME: FAIL ==="
    exit 1
fi