summaryrefslogtreecommitdiff
path: root/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
blob: c0dcaba5cbf58edef1433fdd4d06bc52b9f91c54 (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
# $Id$
# -*- perl -*-
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
    & eval 'exec perl -S $0 $argv:q'
    if 0;

unshift @INC, '../../../../bin';
require Process;
require ACEutils;

$ior1file = "servera.ior";
$ior2file = "serverb.ior";

#  Make sure these aren't hanging around
unlink $ior1file;
unlink $ior2file;

$SV1 = Process::Create ($EXEPREFIX."server_A".$Process::EXE_EXT, 
                        "-o $ior1file -ORBobjrefstyle url");

$SV2 = Process::Create ($EXEPREFIX."server_B".$Process::EXE_EXT, 
                        "-o $ior2file -ORBobjrefstyle url");

ACE::waitforfile ($ior1file);
ACE::waitforfile ($ior2file);

$status = system ($EXEPREFIX."initiator".$Process::EXE_EXT.
		  " -f $ior1file -g $ior2file");

$SV1->Kill (); $SV1->Wait ();
$SV2->Kill (); $SV2->Wait ();

# Clean up
unlink $ior1file;
unlink $ior2file;

# @@ Capture any errors from the server too.
exit $status;