summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl')
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl35
1 files changed, 12 insertions, 23 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl b/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
index 25aa493ff3b..36de02e21a5 100755
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
@@ -5,14 +5,13 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-$usage = "run_tests.pl [-l suppress -ORBGIOPlite] [-n iterations] [-r, for thread-per-rate] [-t low priority threads]\n";
+$usage = "run_tests.pl [-n iterations] [-r, for thread-per-rate] [-t low priority threads]\n";
use lib "../../../../../bin";
-require ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "mtcubit.ior";
+$iorfile = PerlACE::LocalFile ("mtcubit.ior");
$sleeptime = 3;
-$gioplite = '-ORBSvcConf iiop_lite.conf';
$iterations = 1000;
$low_priority_threads = 1;
$thread_per_rate = '';
@@ -21,9 +20,7 @@ $thread_per_rate = '';
#### Process command line args.
####
while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) {
- if ($ARGV[0] eq '-l') {
- $gioplite = '';
- } elsif ($ARGV[0] eq '-n') {
+ if ($ARGV[0] eq '-n') {
if ($ARGV[1] =~ /^[\da-zA-Z]+$/) {
$iterations = $ARGV[1]; shift;
} else {
@@ -54,32 +51,24 @@ $threads = $low_priority_threads + 1;
# Make sure the file is gone, so we can wait on it.
unlink $iorfile;
-$SV = Process::Create ('.' . $DIR_SEPARATOR . "server" . $EXE_EXT,
- " $gioplite $thread_per_rate -f $iorfile -t $threads");
+$SV = new PerlACE::Process ("server", "$thread_per_rate -f $iorfile -t $threads");
+$CL = new PerlACE::Process ("client", "$thread_per_rate -f $iorfile -t $threads -n $iterations");
-sleep $sleeptime;
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
+ $SV->Kill ();
exit 1;
}
-$CL = Process::Create ('.' . $DIR_SEPARATOR . "client" . $EXE_EXT .
- " $gioplite $thread_per_rate " .
- "-f $iorfile -n $iterations -t $threads");
-
-$client = $CL->TimedWait (120);
+$client = $CL->SpawnWaitKill (180);
if ($client == -1) {
print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+ $CL->Kill ();
}
-$SV->Terminate (); $server = $SV->TimedWait (10);
-if ($server == -1) {
- print STDERR "ERROR: server could not be terminated\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+$SV->Kill ();
unlink $iorfile;