1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
8 use PerlACE
::TestTarget
;
12 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
13 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
15 my $iorbase1 = "test1.ior";
16 my $iorbase2 = "test2.ior";
18 my $server_iorfile1 = $server->LocalFile ($iorbase1);
19 my $client_iorfile1 = $client->LocalFile ($iorbase1);
21 my $server_iorfile2 = $server->LocalFile ($iorbase2);
22 my $client_iorfile2 = $client->LocalFile ($iorbase2);
24 $server->DeleteFile ($iorbase1);
25 $server->DeleteFile ($iorbase2);
27 $client->DeleteFile ($iorbase1);
28 $client->DeleteFile ($iorbase2);
30 print STDERR
"\n********** RTCORBA Private Connection Unit Test\n\n";
32 $SV = $server->CreateProcess ("server", "-o $server_iorfile1 -p $server_iorfile2");
33 $CL = $client->CreateProcess ("client", "-o file://$client_iorfile1 -p file://$client_iorfile2 -ORBdebuglevel 3 ");
37 if ($server->WaitForFileTimed ($iorbase2,
38 $server->ProcessStartWaitInterval()) == -1) {
39 print STDERR
"ERROR: cannot find file <$server_iorfile2>\n";
40 $SV->Kill (); $SV->TimedWait (1);
44 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval ());
46 if ($client_status != 0) {
47 print STDERR
"ERROR: client returned $client_status\n";
51 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval ());
53 if ($server_status != 0) {
54 print STDERR
"ERROR: server returned $server_status \n";
58 $server->DeleteFile ($iorbase1);
59 $server->DeleteFile ($iorbase2);
61 $client->DeleteFile ($iorbase1);
62 $client->DeleteFile ($iorbase2);