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
;
10 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
11 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
16 $tp_iiop_port = 27533;
18 $extra_server_args = "-d 1 -ORBEndpoint iiop://1.2\@:$iiop_port -ORBLaneEndpoint 2:0 iiop://1.2\@:$tp_iiop_port";
31 iorfiles
=> [ "persistent_ior", "tp_persistent_ior", "transient_ior" ],
32 server
=> "-a ". $server->LocalFile ("tp_persistent_ior") ." -p ".
33 $server->LocalFile ("persistent_ior") ." -t ".
34 $server->LocalFile ("transient_ior") ." $extra_server_args",
35 clients
=> [ "-k file://".$client->LocalFile("tp_persistent_ior"),
36 "-k file://".$client->LocalFile("persistent_ior"),
37 "-k file://".$client->LocalFile("transient_ior")." -x" ],
39 iorfiles
=> [ "not_used_ior_1", "not_used_ior_2", "transient_ior" ],
40 server
=> "-a ". $server->LocalFile ("not_used_ior_1") ." -p ".
41 $server->LocalFile ("not_used_ior_2") ." -t ".
42 $server->LocalFile ("transient_ior") ." $extra_server_args",
43 clients
=> [ "-k file://".$client->LocalFile("tp_persistent_ior"),
44 "-k file://".$client->LocalFile("persistent_ior"),
45 "-k file://".$client->LocalFile("transient_ior")." -x" ],
51 print "\nRunning client with the following args: @_\n\n";
53 $CL = $client->CreateProcess ("client", @_);
57 $client_status = $CL->WaitKill ($client->ProcessStartWaitInterval ());
59 if ($client_status != 0) {
60 print STDERR
"ERROR: client returned $client_status\n";
70 my $iorfiles = $parms[1];
72 print "\nRunning server with the following args: $args\n\n";
74 $SV = $server->CreateProcess ("server", $args);
77 for $file (@
$iorfiles) {
78 if ($server->WaitForFileTimed ($file,
79 $server->ProcessStartWaitInterval ()) == -1) {
80 print STDERR
"ERROR: cannot find ior file: $file\n";
89 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval ());
91 if ($server_status != 0) {
92 print STDERR
"ERROR: server returned $server_status\n";
97 for $file (@iorfiles) {
98 $server->DeleteFile ($file);
105 for $file (@iorfiles) {
106 $server->DeleteFile ($file);
107 $client->DeleteFile ($file);
110 for $test (@configurations) {
111 print STDERR
"\n******************************************************\n";
113 run_server
($test->{server
}, $test->{iorfiles
});
115 my $clients = $test->{clients
};
116 for $args (@
$clients) {
123 for $file (@iorfiles) {
124 $server->DeleteFile ($file);
125 $client->DeleteFile ($file);