diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-02 02:31:02 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-02 02:31:02 +0000 |
commit | 275a2aeae5edb048dfce21164cb8987f7c257103 (patch) | |
tree | 16f8545dce299ef75df3854cc7cf2988a6193884 /TAO/examples/POA/Reference_Counted_Servant | |
parent | fc27060636580dd259406d1c59f2d73787a11f9c (diff) | |
download | ATCD-275a2aeae5edb048dfce21164cb8987f7c257103.tar.gz |
ChangeLogTag:Thu Mar 1 18:24:32 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/examples/POA/Reference_Counted_Servant')
-rwxr-xr-x | TAO/examples/POA/Reference_Counted_Servant/run_test.pl | 93 | ||||
-rw-r--r-- | TAO/examples/POA/Reference_Counted_Servant/server.dsp | 2 |
2 files changed, 43 insertions, 52 deletions
diff --git a/TAO/examples/POA/Reference_Counted_Servant/run_test.pl b/TAO/examples/POA/Reference_Counted_Servant/run_test.pl index f9d043d4083..99631aec9c6 100755 --- a/TAO/examples/POA/Reference_Counted_Servant/run_test.pl +++ b/TAO/examples/POA/Reference_Counted_Servant/run_test.pl @@ -6,9 +6,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib '../../../../bin'; -use ACEutils; +use PerlACE::Run_Test; -$iorfile = "ior"; +$iorfile = PerlACE::LocalFile ("poa.ior"); $oneway = ""; $iterations = 100; @@ -16,70 +16,61 @@ $iterations = 100; $extra_args = ""; # Parse the arguments -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "run_test [-h] [-i iterations] [-o] [-f ior file]\n"; - print "\n"; - print "-h -- prints this information\n"; - print "-f -- ior file\n"; - print "-i iterations -- specifies iterations\n"; - print "-o -- call issued are oneways\n"; - exit; +for ($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { + print "run_test [-h] [-i iterations] [-o] [-f ior file]\n"; + print "\n"; + print "-h -- prints this information\n"; + print "-f -- ior file\n"; + print "-i iterations -- specifies iterations\n"; + print "-o -- call issued are oneways\n"; + exit; } - if ($ARGV[$i] eq "-o") - { - $oneway = "-o"; - last SWITCH; + elsif ($ARGV[$i] eq "-o") { + $oneway = "-o"; } - if ($ARGV[$i] eq "-i") - { - $iterations = $ARGV[$i + 1]; - $i++; - last SWITCH; + elsif ($ARGV[$i] eq "-i") { + $iterations = $ARGV[$i + 1]; + $i++; } - if ($ARGV[$i] eq "-f") - { - $iorfile = $ARGV[$i + 1]; - $i++; - last SWITCH; + elsif ($ARGV[$i] eq "-f") { + $iorfile = $ARGV[$i + 1]; + $i++; + } + else { + $extra_args .= " " . $ARGV[$i]; } - $extra_args .= " " . $ARGV[$i]; - } } unlink $iorfile; -$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args"); +$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args"); +$CL = new PerlACE::Process ("../Generic_Servant/client", "$extra_args $oneway -i $iterations -f $iorfile -x"); -if (ACE::waitforfile_timed ($iorfile, 15) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} +$status = 0; -$CL = Process::Create ("../Generic_Servant/client$EXE_EXT ", - " $extra_args $oneway -i $iterations -f $iorfile -x"); +$SV->Spawn (); -$client = $CL->TimedWait (60); -if ($client == -1) { - print STDERR "ERROR: client timedout\n"; - $CL->Kill (); $CL->TimedWait (1); +if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); + exit 1; } -$server = $SV->TimedWait (5); -if ($server == -1) { - print STDERR "ERROR: server timedout\n"; - $SV->Kill (); $SV->TimedWait (1); +$client = $CL->SpawnWaitKill (60); + +if ($client != 0) { + print STDERR "ERROR: client returned $client\n"; + $status = 1; } -unlink $iorfile; +$server = $SV->WaitKill (5); -if ($server != 0 || $client != 0){ - exit 1; +if ($server != 0) { + print STDERR "ERROR: server returned $server\n"; + $status = 1; } -exit 0; +unlink $iorfile; + +exit $status; diff --git a/TAO/examples/POA/Reference_Counted_Servant/server.dsp b/TAO/examples/POA/Reference_Counted_Servant/server.dsp index efa67573d53..a53303ee6c0 100644 --- a/TAO/examples/POA/Reference_Counted_Servant/server.dsp +++ b/TAO/examples/POA/Reference_Counted_Servant/server.dsp @@ -37,7 +37,7 @@ RSC=rc.exe # PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
|