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
;
19 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
20 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
22 my $iorbase = "test.ior";
23 my $server_iorfile = $server->LocalFile ($iorbase);
24 my $client_iorfile = $client->LocalFile ($iorbase);
25 $server->DeleteFile($iorbase);
26 $client->DeleteFile($iorbase);
28 my $svc_conf = 'svc.conf';
30 # copy the configuation files
31 if ($server->PutFile ($svc_conf) == -1) {
32 print STDERR
"ERROR: cannot set file <".$server->LocalFile ($svc_conf).">\n";
35 if ($server->PutFile ($svc_conf.'.xml') == -1) {
36 print STDERR
"ERROR: cannot set file <".$server->LocalFile ($svc_conf.'.xml').">\n";
39 if ($client->PutFile ($svc_conf) == -1) {
40 print STDERR
"ERROR: cannot set file <".$client->LocalFile ($svc_conf).">\n";
43 if ($client->PutFile ($svc_conf.'.xml') == -1) {
44 print STDERR
"ERROR: cannot set file <".$client->LocalFile ($svc_conf.'.xml').">\n";
48 print STDERR
"\n RTCORBA CLIENT_PROPAGATED Priority Unit Test\n\n";
50 $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
51 $CL = $client->CreateProcess ("client", "-ORBdebuglevel $debug_level -k file://$client_iorfile");
53 $server_status = $SV->Spawn ();
55 if ($server_status != 0) {
56 print STDERR
"ERROR: server returned $server_status\n";
60 if ($server->WaitForFileTimed ($iorbase,
61 $server->ProcessStartWaitInterval()) == -1) {
62 $server = $SV->TimedWait (1);
64 # Mark as no longer running to avoid errors on exit.
68 print STDERR
"ERROR: cannot find file <$iorbase>\n";
74 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
76 if ($client_status != 0) {
77 print STDERR
"ERROR: client returned $client_status\n";
81 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 45);
83 if ($server_status != 0) {
84 print STDERR
"ERROR: server returned $server_status\n";
88 $server->DeleteFile($iorbase);
89 $client->DeleteFile($iorbase);