1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
6 use lib
"$ENV{ACE_ROOT}/bin";
7 use PerlACE
::TestTarget
;
9 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
10 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
12 $iorbase = "test.ior";
14 $server_iorfile = $server->LocalFile ($iorbase);
15 $client_iorfile = $client->LocalFile ($iorbase);
17 $server->DeleteFile ($iorbase);
18 $client->DeleteFile ($iorbase);
20 my $svc_conf = 'svc.conf';
22 # copy the configuation files
23 if ($server->PutFile ($svc_conf) == -1) {
24 print STDERR
"ERROR: cannot set file <".$server->LocalFile ($svc_conf).">\n";
27 if ($client->PutFile ($svc_conf) == -1) {
28 print STDERR
"ERROR: cannot set file <".$client->LocalFile ($svc_conf).">\n";
34 $PROC = $server->CreateProcess ("simple_client", , "-ORBSvcConfDirective \"static RT_ORB_Loader '-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM -ORBPriorityMapping continuous'\"");
36 $proc_status = $PROC->SpawnWaitKill ($server->ProcessStartWaitInterval ());
38 if ($proc_status != 0){
39 print STDERR
"ERROR: simple_client returned $proc_status\n";
43 $PROC = $server->CreateProcess ("simple_client", , "-ORBSvcConfDirective \"static RT_ORB_Loader '-ORBSchedPolicy SCHED_FIFO -ORBScopePolicy SYSTEM -ORBPriorityMapping linear'\"");
45 $proc_status = $PROC->SpawnWaitKill ($server->ProcessStartWaitInterval ());
47 if ($proc_status != 0){
48 print STDERR
"ERROR: simple_client returned $proc_status\n";
52 print STDERR
"\n RTCORBA CLIENT_PROPAGATED Linear Priority Mapping Unit Test\n\n";
54 $SV = $server->CreateProcess ("server", , "-o $server_iorfile");
55 $CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
59 if ($server->WaitForFileTimed ($iorbase,
60 $server->ProcessStartWaitInterval()) == -1){
61 $server_status = $SV->TimedWait (1);
62 if ($server_status == 2){
63 # Mark as no longer running to avoid errors on exit.
68 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
74 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval ());
76 if ($client_status != 0){
77 print STDERR
"ERROR: client returned $client_status\n";
81 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval ());
83 if ($server_status != 0){
84 print STDERR
"ERROR: server returned $server_status\n";
88 $server->DeleteFile ($iorbase);
89 $client->DeleteFile ($iorbase);