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);
36 my $conf_base = "svc1" . $PerlACE::svcconf_ext
;
37 my $server_conf = $server->LocalFile ($conf_base);
38 my $client_conf = $client->LocalFile ($conf_base);
39 my $t3_conf = $t3->LocalFile ($conf_base);
41 if ($server->PutFile ($conf_base) == -1) {
42 print STDERR
"ERROR: cannot set file <$server_conf>\n";
46 if ($client->PutFile ($conf_base) == -1) {
47 print STDERR
"ERROR: cannot set file <$client_conf>\n";
51 if ($t3->PutFile ($conf_base) == -1) {
52 print STDERR
"ERROR: cannot set file <$t3_conf>\n";
56 $server->DeleteFile($iorbase);
57 $client->DeleteFile($iorbase);
59 $SV = $server->CreateProcess ("server",
60 "-ORBdebuglevel $debug_level " .
61 "-ORBSvcConf $server_conf " .
62 "-o $server_iorfile");
64 $T = $client->CreateProcess ("OctetSeq",
65 "-ORBdebuglevel $debug_level " .
66 "-ORBSvcConf $client_conf " .
67 "-n $octet_iterations -l $low -h $high -s $step -q");
69 $CL = $t3->CreateProcess ("client",
70 "-ORBSvcConf $t3_conf " .
71 "-i $client_iterations -k file://$client_iorfile");
73 print STDERR
"\n\n==== Octet sequence passing test\n";
75 $server_status = $SV->Spawn ();
77 if ($server_status != 0) {
78 print STDERR
"ERROR: server returned $server_status\n";
82 if ($server->WaitForFileTimed ($iorbase,
83 $server->ProcessStartWaitInterval()) == -1) {
84 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
85 $SV->Kill (); $SV->TimedWait (1);
89 if ($server->GetFile ($iorbase) == -1) {
90 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
91 $SV->Kill (); $SV->TimedWait (1);
94 if ($client->PutFile ($iorbase) == -1) {
95 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
96 $SV->Kill (); $SV->TimedWait (1);
100 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 100);
102 if ($client_status != 0) {
103 print STDERR
"ERROR: client returned $client_status\n";
107 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10);
109 if ($server_status != 0) {
110 print STDERR
"ERROR: server returned $server\n";
114 print STDERR
"\n\n==== Octet sequence performance test\n";
116 $test = $T->SpawnWaitKill ($t3->ProcessStartWaitInterval() + 45);
119 print STDERR
"ERROR: test returned $test\n";
123 $server->DeleteFile($iorbase);
124 $client->DeleteFile($iorbase);