File: test1.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 (63 lines) | stat: -rw-r--r-- 1,623 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

# $Id: test1.sh,v 1.12 1993/12/15 17:03:45 genek Exp $ 

HOSTNAME=hostname
# check to see if we ran from top-level makefile!
if [ $# -ne 2 ]
then 
   echo "Sorry!  You must run this test from the top-level Makefile!"
   exit 1
fi

HOSTNAME=$1
DIST=$2
ME=$0

cat << GHK
=== $ME: DESCRIPTION

    This shell script tests all the Tripwire signature routines.
Consequently, this test may take awhile to complete, because even the
slowest signature routines are exercised.  On a Sequent Symmetry
running 16 Mhz Intel 80386s, this test takes over five minutes to
complete.

    This same test using only the MD5 routines completes in less
than 30 seconds.

    This test suite will ascertain whether the byte-ordering and 
machine-dependent routines are working correctly.

GHK

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

echo creating: ./tw.db_TEST.@
echo creating: ./@tw.config

HOST=`$HOSTNAME`
CURRPATH=`pwd`
CURRPATH=`echo $CURRPATH | sed s,/tests$,,`

sed s,/tmp/genek/$DIST,$CURRPATH, < ./tw.db_TEST > ./tw.db_TEST.@; 
sed s,/tmp/genek/$DIST,$CURRPATH, < ./tw.conf.test > ./@tw.config; 

../src/tripwire -loosedir -c ./@tw.config -d ./tw.db_TEST.@; 

echo "=== $ME: END ===" 
echo ''

echo Tripwire should have only reported: 
echo "    added:   $CURRPATH/tests/@tw.config" 
echo "             $CURRPATH/tests/tw.db_TEST.@... "
echo "             $CURRPATH/tests/OKEXER... "
echo "    changed: $CURRPATH/... (maybe some directory sizes...) "
echo "             ...and any other files you may have changed!"
echo ''
echo ''
echo removing: ./tests/tw.db_TEST.@
echo removing: @tw.config
rm ./tw.db_TEST.@
rm ./@tw.config