1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 # This is a Perl script that runs all Naming Service tests. It starts
8 # all the servers and clients as necessary.
10 use lib
"$ENV{ACE_ROOT}/bin";
11 use PerlACE
::TestTarget
;
13 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
14 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
16 my $iorbase = "test.ior";
17 my $server_iorfile = $server->LocalFile ($iorbase);
18 my $client_iorfile = $client->LocalFile ($iorbase);
19 $server->DeleteFile($iorbase);
20 $client->DeleteFile($iorbase);
24 for ($i = 0; $i <= $#ARGV; $i++) {
25 if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
26 print "Run_Test Perl script for TAO Param Test\n\n";
27 print "run_test [-d>]\n";
28 print "-d -- runs test in debug mode\n";
31 elsif ($ARGV[$i] eq "-d") {
36 $SV = $server->CreateProcess ("server", " -ORBDottedDecimalAddresses 1 -o $server_iorfile");
37 $CL = $client->CreateProcess ("client", "-k file://$client_iorfile -x $debug");
41 if ($server->WaitForFileTimed ($iorbase,
42 $server->ProcessStartWaitInterval()) == -1) {
43 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
44 $SV->Kill (); $SV->TimedWait (1);
48 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval ());
50 if ($client_status != 0) {
51 print STDERR
"ERROR: client returned $client_status\n";
55 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval ());
57 if ($server_status != 0) {
58 print STDERR
"ERROR: server returned $server_status\n";
62 $server->DeleteFile($iorbase);
63 $client->DeleteFile($iorbase);