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 $client_iterations = '5000';
15 $octet_iterations = '32';
26 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
27 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
28 my $t3 = PerlACE
::TestTarget
::create_target
(3) || die "Create target 3 failed\n";
32 my $iorbase = "test.ior";
33 my $server_iorfile = $server->LocalFile ($iorbase);
34 my $client_iorfile = $t3->LocalFile ($iorbase);
35 $server->DeleteFile($iorbase);
36 $client->DeleteFile($iorbase);
38 $SV = $server->CreateProcess ("server",
39 "-ORBdebuglevel $debug_level " .
40 "-o $server_iorfile");
42 $T = $client->CreateProcess ("OctetSeq",
43 "-ORBdebuglevel $debug_level " .
44 "-n $octet_iterations -l $low -h $high -s $step -q");
46 $CL = $t3->CreateProcess ("client", "-i $client_iterations -k file://$client_iorfile");
48 print STDERR
"\n\n==== Octet sequence passing test\n";
50 $server_status = $SV->Spawn ();
52 if ($server_status != 0) {
53 print STDERR
"ERROR: server returned $server_status\n";
57 if ($server->WaitForFileTimed ($iorbase,
58 $server->ProcessStartWaitInterval()) == -1) {
59 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
60 $SV->Kill (); $SV->TimedWait (1);
64 if ($server->GetFile ($iorbase) == -1) {
65 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
66 $SV->Kill (); $SV->TimedWait (1);
69 if ($client->PutFile ($iorbase) == -1) {
70 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
71 $SV->Kill (); $SV->TimedWait (1);
75 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 100);
77 if ($client_status != 0) {
78 print STDERR
"ERROR: client returned $client_status\n";
82 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10);
84 if ($server_status != 0) {
85 print STDERR
"ERROR: server returned $server\n";
89 print STDERR
"\n\n==== Octet sequence performance test\n";
91 $test = $T->SpawnWaitKill ($t3->ProcessStartWaitInterval() + 45);
94 print STDERR
"ERROR: test returned $test\n";
98 $server->DeleteFile($iorbase);
99 $client->DeleteFile($iorbase);