summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Event/Basic/run_test.pl
blob: 1aa10dae73674b986afab401afd5ab3f47ff08d6 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
    & eval 'exec perl -S $0 $argv:q'
    if 0;

# $Id$
# -*- perl -*-

# This is a Perl script that runs the client and all the other servers that
# are needed

unshift @INC, '../../../../../bin';
require ACEutils;
require Uniqueid;
use Cwd;

$cwd = getcwd();
ACE::checkForTarget($cwd);
$status = 0;

print STDERR "\n\nReconnect suppliers and consumers,",
  " using disconnect/connect calls\n";
$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
                      " -suppliers 100 -consumers 100 -d 100");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nReconnect suppliers and consumers, using connect calls\n";
$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
                      " -suppliers 100 -consumers 100 -d 100 -s -c");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}


print STDERR "\n\nShutdown EC with clients still attached\n";
$T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
                      " -suppliers 5 -consumers 5");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nGateway test\n";
$T = Process::Create ($EXEPREFIX . "Gateway".$EXE_EXT,
                      " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nComplex event channel test,",
  "multiple ECs connected through gateways\n";
$T = Process::Create ($EXEPREFIX . "Observer".$EXE_EXT,
                      " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf"
                      ." -consumer_tshift 0 -consumers 5"
                      ." -supplier_tshift 0 -suppliers 2"
                      ." -burstsize 10 -burstcount 10 -burstpause 0");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nTimeout tests\n";
$T = Process::Create ($EXEPREFIX . "Timeout".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nWildcard tests\n";
$T = Process::Create ($EXEPREFIX . "Wildcard".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nNegation tests\n";
$T = Process::Create ($EXEPREFIX . "Negation".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nBitmask tests\n";
$T = Process::Create ($EXEPREFIX . "Bitmask".$EXE_EXT,
                      " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nDisconnect callbacks test\n";
$T = Process::Create ($EXEPREFIX . "Disconnect".$EXE_EXT,
                      "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nMT Disconnects test\n";
$T = Process::Create ($EXEPREFIX . "MT_Disconnect".$EXE_EXT,
                     " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf");
if ($T->TimedWait (240) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nAtomic Reconnection test\n";
$T = Process::Create ($EXEPREFIX . "Atomic_Reconnect".$EXE_EXT,
                     " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf");
if ($T->TimedWait (120) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nComplex filter\n";
$T = Process::Create ($EXEPREFIX . "Complex".$EXE_EXT,
                     " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nControl test\n";
$T = Process::Create ($EXEPREFIX . "Control".$EXE_EXT,
                     " -ORBSvcConf $cwd$DIR_SEPARATOR" . "control.conf");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

print STDERR "\n\nRandom test\n";
$T = Process::Create ($EXEPREFIX . "Random".$EXE_EXT,
		      " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.conf"
		      . " -suppliers 4 -consumers 4 -max_recursion 1");
if ($T->TimedWait (60) == -1) {
  print STDERR "ERROR: Test timedout\n";
  $status = 1;
  $T->Kill (); $T->TimedWait (1);
}

exit $status;