diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-22 06:59:51 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-22 06:59:51 +0000 |
commit | 4184fc4a416907c6ea38e9238538243b0a40290d (patch) | |
tree | 3ebe235239e02439a2831b80885dcd9e95d4e91f /TAO/examples/POA/On_Demand_Activation/run_test.pl | |
parent | 71212c0d4676a8fe9eaa3f3f779994f637264ccc (diff) | |
download | ATCD-4184fc4a416907c6ea38e9238538243b0a40290d.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/examples/POA/On_Demand_Activation/run_test.pl')
-rwxr-xr-x | TAO/examples/POA/On_Demand_Activation/run_test.pl | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/TAO/examples/POA/On_Demand_Activation/run_test.pl b/TAO/examples/POA/On_Demand_Activation/run_test.pl new file mode 100755 index 00000000000..f8b431cb97a --- /dev/null +++ b/TAO/examples/POA/On_Demand_Activation/run_test.pl @@ -0,0 +1,65 @@ +#$Id$ +# -*- perl -*- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +unshift @INC, '../../../../bin'; +require ACEutils; + +$iorfile = "ior"; + +$oneway = ""; +$iterations = 100; + +# 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; + } + if ($ARGV[$i] eq "-o") + { + $oneway = "-o"; + last SWITCH; + } + if ($ARGV[$i] eq "-i") + { + $iterations = $ARGV[$i + 1]; + $i++; + last SWITCH; + } + if ($ARGV[$i] eq "-f") + { + $iorfile = $ARGV[$i + 1]; + $i++; + last SWITCH; + } + print "run_test: Unknown Option: ".$ARGV[$i]."\n"; + } +} + +$iorfile_1 = $iorfile."_1"; +$iorfile_2 = $iorfile."_2"; + +$SV = Process::Create ("server$Process::EXE_EXT", "-f $iorfile"); + +ACE::waitforfile ($iorfile_1); +ACE::waitforfile ($iorfile_2); + +$status = system ("../Generic_Servant/client$Process::EXE_EXT $oneway -i $iterations -f $iorfile_1"); +$status = system ("../Generic_Servant/client$Process::EXE_EXT $oneway -i $iterations -f $iorfile_2 -x"); + +unlink $iorfile_1; +unlink $iorfile_2; + +exit $status; |