Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / Bug_3108_Regression / run_test.pl
blob8e388a668f844384330475f391f015b05611aa8b
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
10 $status = 0;
11 $debug_level = '0';
12 $debug_opts_sv = '';
13 $debug_opts_cl = '';
15 my $target1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
16 my $target2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
19 foreach $i (@ARGV) {
20 if ($i eq '-debug') {
21 $debug_level = '10';
22 $debug_log_sv = $target1->LocalFile ('server.log');
23 $debug_log_cl = $target1->LocalFile ('client.log');
25 $debug_opts_sv = "-ORBLogFile " . $debug_log_sv;
26 $debug_opts_cl = "-ORBLogFile " . $debug_log_cl;
30 $iorbase = "server.ior";
31 $iorfile1 = $target1->LocalFile ("$iorbase");
32 $iorfile2 = $target2->LocalFile ("$iorbase");
33 $target1->DeleteFile($iorbase);
34 $target2->DeleteFile($iorbase);
36 $SV = $target1->CreateProcess ("server", "$debug_opts_sv -ORBdebuglevel $debug_level -o $iorfile1");
37 $CL = $target2->CreateProcess ("client", "$debug_opts_cl -ORBDebugLevel $debug_level -k file://$iorfile2");
39 $server = $SV->Spawn ();
41 if ($server != 0) {
42 print STDERR "ERROR: server returned $server\n";
43 exit 1;
46 if ($target1->WaitForFileTimed ($iorbase,
47 $target1->ProcessStartWaitInterval()) == -1) {
48 print STDERR "ERROR: cannot find file <$iorfile1>\n";
49 $SV->Kill (); $SV->TimedWait (1);
50 exit 1;
53 $client = $CL->SpawnWaitKill ($target2->ProcessStartWaitInterval() + 285);
55 if ($client != 0) {
56 print STDERR "ERROR: client returned $client\n";
57 $status = 1;
60 $server = $SV->WaitKill ($target1->ProcessStopWaitInterval());
62 if ($server != 0) {
63 print STDERR "ERROR: server returned $server\n";
64 $status = 1;
67 $target1->GetStderrLog();
68 $target2->GetStderrLog();
70 $target1->DeleteFile($iorbase);
71 $target2->DeleteFile($iorbase);
73 exit $status;