blob: b9f3791d1b5893e70a8020bf49c2f796c712f46b (
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
|
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# $Id$
# -*- perl -*-
unshift @INC, '../../../../bin';
require Process;
require ACEutils;
print STDERR "================ Collocated tests, single threaded\n";
$T = Process::Create ($EXEPREFIX."ECT_Throughput".$Process::EXE_EXT,
" -ORBsvcconf ec.conf -m new -u 10000 -n 1 -t 0"
. " -c 4");
if ($T->TimedWait (60) == -1) {
print STDERR "ERROR: test timedout\n";
$T->Kill (); $T->TimedWait (1);
exit 1;
}
print STDERR "================ Collocated tests, single threaded\n";
$T = Process::Create ($EXEPREFIX."ECT_Throughput".$Process::EXE_EXT,
" -ORBsvcconf ec.mt.conf -m new -u 10000 -n 1 -t 0"
. " -c 4");
if ($T->TimedWait (60) == -1) {
print STDERR "ERROR: test timedout\n";
$T->Kill (); $T->TimedWait (1);
exit 1;
}
print STDERR "================ Remote test\n";
$ns_ior = "NameService.ior";
unlink $ns_ior;
$NS = Process::Create ("..".$DIR_SEPARATOR.
"..".$DIR_SEPARATOR.
"Naming_Service".$DIR_SEPARATOR.
"Naming_Service".$Process::EXE_EXT,
" -o $ns_ior ");
if (ACE::waitforfile_timed ($ns_ior, 5) == -1) {
print STDERR "ERROR: cannot find file <$ns_ior>\n";
$NS->Kill (); $NS->TimedWait (1);
exit 1;
}
$ES = Process::Create ("..".$DIR_SEPARATOR.
"..".$DIR_SEPARATOR.
"Event_Service".$DIR_SEPARATOR.
"Event_Service".$Process::EXE_EXT,
" -ORBNameServiceIOR file://$ns_ior "
." -ORBSvcConf ec.conf "
. " -t NEW");
sleep 5;
$C = Process::Create ($EXEPREFIX."ECT_Consumer".$Process::EXE_EXT,
" -ORBNameServiceIOR file://$ns_ior "
. " -c 4 -s 1");
$S = Process::Create ($EXEPREFIX."ECT_Supplier".$Process::EXE_EXT,
" -ORBNameServiceIOR file://$ns_ior "
. " -s 1 -u 10000 -n 1 -t 0");
if ($S->TimedWait (60) == -1) {
print STDERR "ERROR: supplier timedout\n";
$S->Kill (); $S->TimedWait (1);
$C->Kill (); $C->TimedWait (1);
$ES->Kill (); $ES->TimedWait (1);
$NS->Kill (); $NS->TimedWait (1);
exit 1;
}
if ($C->TimedWait (60) == -1) {
print STDERR "ERROR: consumer timedout\n";
$C->Kill (); $C->TimedWait (1);
$ES->Kill (); $ES->TimedWait (1);
$NS->Kill (); $NS->TimedWait (1);
exit 1;
}
if ($ES->TimedWait (5) == -1) {
print STDERR "ERROR: event channel timedout\n";
$ES->Kill (); $ES->TimedWait (1);
$NS->Kill (); $NS->TimedWait (1);
exit 1;
}
$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
print STDERR "ERROR: cannot terminate naming service\n";
$NS->Kill (); $NS->TimedWait (1);
exit 1;
}
unlink $ns_ior;
# @@ Capture the errors from the processes.
exit 0;
|