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
;
12 $server_name = "server";
19 elsif ($i eq "-async_1") {
20 $server_name = "async_server";
22 elsif ($i eq "-async_2") {
23 $server_name = "async_server";
26 elsif ($i eq "-async_3") {
27 $server_name = "async_server";
32 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create failed\n";
33 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create failed\n";
35 my $TARGETHOSTNAME = $client->HostName ();
36 my $port = $client->RandomPort ();
38 $server->DeleteFile($iorbase);
39 $client->DeleteFile($iorbase);
41 $SV = $server->CreateProcess ($server_name, "$async_opt -ORBdebuglevel $debug_level -ORBListenEndpoints iiop://$TARGETHOSTNAME:$port");
42 $CL = $client->CreateProcess ("client",
43 "-ORBdebuglevel $debug_level ".
44 "-a corbaloc:iiop:$TARGETHOSTNAME:$port/SIMPLE_TEST_KEY");
46 print "Starting $server_name $async_opt\n";
47 $server_status = $SV->Spawn ();
49 if ($server_status != 0) {
50 print STDERR
"ERROR: server returned $server_status\n";
57 $client_status = $CL->Spawn ();
59 if ($client_status != 0) {
60 print STDERR
"ERROR: client returned $client_status\n";
61 $SV->Kill (); $SV->TimedWait (1);
65 $client_status = $CL->WaitKill ($client->ProcessStopWaitInterval());
67 if ($client_status != 0) {
68 print STDERR
"ERROR: client returned $client_status\n";
72 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
74 if ($server_status != 0) {
75 print STDERR
"ERROR: server returned $server_status\n";
79 $server->DeleteFile($iorbase);
80 $client->DeleteFile($iorbase);