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 $svc_conf = $PerlACE::svcconf_ext
;
20 # Set the SSL environment
21 # This doesn't work on Windows. For some reason,
22 # environment variables aren't propagated to child processes.
23 #$ENV{'SSL_CERT_FILE'} = 'cacert.pem';
25 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
26 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
28 my $iorbase = "test.ior";
29 my $server_iorfile = $server->LocalFile ($iorbase);
30 my $client_iorfile = $client->LocalFile ($iorbase);
31 $server->DeleteFile($iorbase);
32 $client->DeleteFile($iorbase);
35 $SV = $server->CreateProcess ("server",
36 "-ORBdebuglevel $debug_level " .
37 "-ORBSvcConf server$svc_conf " .
38 "-o $server_iorfile ");
40 $CL = $client->CreateProcess ("client",
41 "-ORBSvcConf client$svc_conf " .
42 "-k file://$client_iorfile");
44 print STDERR
"\n\n==== Running Secure_Invocation test\n";
46 $server_status = $SV->Spawn ();
48 if ($server_status != 0) {
49 print STDERR
"ERROR: server returned $server_status\n";
53 if ($server->WaitForFileTimed ($iorbase,
54 $server->ProcessStartWaitInterval()) == -1) {
55 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
56 $SV->Kill (); $SV->TimedWait (1);
60 if ($server->GetFile ($iorbase) == -1) {
61 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
62 $SV->Kill (); $SV->TimedWait (1);
65 if ($client->PutFile ($iorbase) == -1) {
66 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
67 $SV->Kill (); $SV->TimedWait (1);
71 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
73 if ($client_status != 0) {
74 print STDERR
"ERROR: client returned $client_status\n";
78 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
80 if ($server_status != 0) {
81 print STDERR
"ERROR: server returned $server_status\n";
85 $server->DeleteFile($iorbase);
86 $client->DeleteFile($iorbase);