~ubuntu-branches/debian/experimental/ion/experimental

« back to all changes in this revision

Viewing changes to tests/bsp/105-106-bei/dotest

  • Committer: Package Import Robot
  • Author(s): Leo Iannacone
  • Date: 2012-02-01 09:46:31 UTC
  • Revision ID: package-import@ubuntu.com-20120201094631-qpfwehc1b7ftkjgx
Tags: upstream-2.5.3~dfsg1
ImportĀ upstreamĀ versionĀ 2.5.3~dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
 
 
4
echo "Cleaning up old ION..."
 
5
rm -f rcv snd tmp
 
6
killm
 
7
sleep 1
 
8
 
 
9
 
 
10
srcdir=`pwd`
 
11
configdir="config"
 
12
 
 
13
 
 
14
echo "ionstart -I ${configdir}/host1.rc"
 
15
"ionstart" -I "${configdir}/host1.rc"
 
16
 
 
17
echo "Starting messasge listener..."
 
18
bpsink ipn:1.2 > tmp &
 
19
 
 
20
bpsink_pid=$!
 
21
 
 
22
bpsource ipn:1.2 <<BPS
 
23
test_1
 
24
!
 
25
BPS
 
26
 
 
27
sleep 1
 
28
 
 
29
grep "test_1" tmp > rcv
 
30
echo "'test_1'" > snd
 
31
 
 
32
PASS=1
 
33
if diff -w snd rcv
 
34
then
 
35
        echo "SUCCESS (1/2)"
 
36
else
 
37
        echo "FAIL (1/2)"
 
38
        PASS=0
 
39
fi 
 
40
 
 
41
 
 
42
kill -9 $bpsink_pid
 
43
 
 
44
sleep 1
 
45
 
 
46
rm -f tmp rcv
 
47
 
 
48
bpsink ipn:1.2 > tmp &
 
49
bpsink_pid=$!
 
50
 
 
51
ionsecadmin <<SAC
 
52
a bspbabrule ipn:1.* ipn:1.* 'HMAC_SHA1' testkey
 
53
SAC
 
54
 
 
55
bpsource ipn:1.2 <<BPS
 
56
test_2
 
57
!
 
58
BPS
 
59
 
 
60
sleep 1
 
61
 
 
62
grep "test_2" tmp > rcv
 
63
echo "'test_2'" > snd
 
64
 
 
65
if diff -w snd rcv
 
66
then
 
67
        echo "SUCCESS (2/2)"
 
68
else
 
69
        echo "FAIL (2/2)"
 
70
        PASS=0
 
71
fi
 
72
 
 
73
rm -f tmp rcv tmp
 
74
 
 
75
if [ $PASS -eq 0 ]
 
76
then
 
77
        exit 1
 
78
else
 
79
        exit 0
 
80
fi