summaryrefslogtreecommitdiff
path: root/TAO/CIAO/examples/Hello/descriptors/run_test_multirecv.pl
blob: b9ba392c657f6bd392e9298762d6a812138c09f9 (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
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 Hello example.

use lib "$ENV{'ACE_ROOT'}/bin";
use PerlACE::Run_Test;

$status = 0;

$ACE_ROOT=$ENV{'ACE_ROOT'};
$CIAO_ROOT=$ENV{'CIAO_ROOT'};
# amount of delay between running the servers
$sleeptime = 1;
$longsleeptime = 3;
$DM_args = "-ORBEndpoint iiop://localhost:20000 -n ${CIAO_ROOT}/tools/ComponentServer/ComponentServer";
$DM = new PerlACE::Process ("${CIAO_ROOT}/tools/Daemon/CIAO_Daemon", "$DM_args");

$AM_args = "-o ior -c test.dat";
$AM = new PerlACE::Process ("${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Manager", "$AM_args");

$AD_args = "-k file://ior -a multi-receivers-default.cad";
$AD = new PerlACE::Process ("${CIAO_ROOT}/tools/Assembly_Deployer/Assembly_Deployer", "$AD_args");

$ST = new PerlACE::Process ("${CIAO_ROOT}/examples/Hello/Sender/starter");

# Start the daemons.
$DM->Spawn ();

# Give the service time to settle
sleep $sleeptime;

# Start the Assembly_Manager
$AM->Spawn ();

# Sait till the Manager finishes writing the IOR
sleep $longsleeptime;

# Start the Assembly_Deployer
$AD->Spawn ();

# This might take a while
sleep $longsleeptime;


#Now start the starter for 1 times.
#$ST->SpawnWaitKill (10);
$ST->SpawnWaitKill (2);
$ST->SpawnWaitKill (2);
$ST->SpawnWaitKill (2);

sleep 2;

#You will see lots of errors when shutting down all services.
#I will try to find a way to shutdown everything gracefully.
exit $status;