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
;
13 $iterations = '10000';
21 print STDERR
"================ Collocated Activation Test\n";
23 my $server1 = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
24 my $server2 = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
25 my $client = PerlACE
::TestTarget
::create_target
(3) || die "Create target 3 failed\n";
28 my $iorbase = "test.ior";
29 my $server_iorfile = $server2->LocalFile ($iorbase);
30 my $client_iorfile = $client->LocalFile ($iorbase);
31 $server2->DeleteFile($iorbase);
32 $client->DeleteFile($iorbase);
34 $CO = $server1->CreateProcess ("collocated", "-i $iterations");
35 $SV = $server2->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
36 $CL = $client->CreateProcess ("client", "-k file://$client_iorfile " .
39 $server_status = $CO->SpawnWaitKill ($server1->ProcessStartWaitInterval() + 100);
41 if ($client_status != 0) {
42 print STDERR
"ERROR: server returned $server_status\n";
46 print STDERR
"================ Activation Latency Test\n";
48 $server_status = $SV->Spawn ();
50 if ($server_status != 0) {
51 print STDERR
"ERROR: server returned $server_status\n";
55 if ($server2->WaitForFileTimed ($iorbase,
56 $server2->ProcessStartWaitInterval()) == -1) {
57 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
58 $SV->Kill (); $SV->TimedWait (1);
62 if ($server2->GetFile ($iorbase) == -1) {
63 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
64 $SV->Kill (); $SV->TimedWait (1);
67 if ($client->PutFile ($iorbase) == -1) {
68 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
69 $SV->Kill (); $SV->TimedWait (1);
73 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 100);
75 if ($client_status != 0) {
76 print STDERR
"ERROR: client returned $client_status\n";
80 $server_status = $SV->WaitKill ($server2->ProcessStopWaitInterval());
82 if ($server_status != 0) {
83 print STDERR
"ERROR: server returned $server_status\n";
87 $server2->DeleteFile($iorbase);
88 $client->DeleteFile($iorbase);