summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-01 22:16:14 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-01 22:16:14 +0000
commitbf1af5e0405ab6a96d078d135739fd2ea5bdb7a9 (patch)
treec3922d0fac3785c9cf5f5ba6e65cc0524d4542f6 /TAO/performance-tests/Cubit
parent8045ecb1797e3e6acce85fdb87707e6f50820bc9 (diff)
downloadATCD-bf1af5e0405ab6a96d078d135739fd2ea5bdb7a9.tar.gz
ChangeLogTag:Thu Mar 1 14:14:38 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/performance-tests/Cubit')
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/DII_Cubit/run_test.pl136
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl304
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl19
3 files changed, 151 insertions, 308 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/DII_Cubit/run_test.pl b/TAO/performance-tests/Cubit/TAO/DII_Cubit/run_test.pl
index 9265b516fbd..5373e0b021b 100755
--- a/TAO/performance-tests/Cubit/TAO/DII_Cubit/run_test.pl
+++ b/TAO/performance-tests/Cubit/TAO/DII_Cubit/run_test.pl
@@ -5,114 +5,80 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-# The first three lines above let this script run without specifying the
-# full path to perl, as long as it is in the user's PATH.
-# Taken from perlrun man page.
-
-# Do not use environment variables here since not all platforms use ACE_ROOT
use lib "../../../../../bin";
+use PerlACE::Run_Test;
-require ACEutils;
-
-$iorfile = "cubit.ior";
-$clexepref = '.' . $DIR_SEPARATOR;
-$svexepref = ".." . $DIR_SEPARATOR . "IDL_Cubit" . $DIR_SEPARATOR;
-$svnsflags = " -f $iorfile";
-$clnsflags = " -f $iorfile";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("cubit.ior");
+$svnsflags = " -f $iorfile ";
+$clnsflags = " -f $iorfile ";
$clflags = "";
$svflags = "";
-# Make sure the file is gone, so we can wait on it.
-unlink $iorfile;
-
-
+###############################################################################
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-n num] [-sleeptime t] [-debug] [-release] [-orblite]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-n num -- client uses <num> iterations\n";
- print "-sleeptime t -- run_test should sleep for <t> seconds between running\n";
- print " the server and client (default is 5 seconds)\n";
- print "-debug -- sets the debug flag for both client and server\n";
- print "-release -- runs the Release version of the test (for NT use)\n";
- print "-orblite -- Use the lite version of the orb";
- exit;
- }
- if ($ARGV[$i] eq "-debug")
- {
- $clflags .= " -d";
- $svflags .= " -d";
- last SWITCH;
+for (my $i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-n num] [-debug] [-orblite]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-n num -- client uses <num> iterations\n";
+ print "-debug -- sets the debug flag for both client and server\n";
+ print "-orblite -- Use the lite version of the orb";
+ exit;
}
- if ($ARGV[$i] eq "-release")
- {
- $exepref = "Release".$DIR_SEPARATOR;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-debug") {
+ $clflags .= " -d ";
+ $svflags .= " -d ";
}
- if ($ARGV[$i] eq "-n")
- {
- $clflags .= " -n $ARGV[$i + 1]";
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-n") {
+ $clflags .= " -n $ARGV[$i + 1] ";
+ $i++;
}
- if ($ARGV[$i] eq "-sleeptime")
- {
- $ACE::sleeptime = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-orblite") {
+ $clflags .= " -ORBgioplite ";
+ $svflags .= " -ORBgioplite ";
}
- if ($ARGV[$i] eq "-orblite")
- {
- $clflags .= " -ORBgioplite";
- $svflags .= " -ORBgioplite";
- last SWITCH;
+ else {
+ print STDERR "ERROR: Unknown Option: ".$ARGV[$i]."\n";
}
- print "run_test: Unknown Option: ".$ARGV[$i]."\n";
- }
}
-(-f $svexepref."server".$EXE_EXT &&
- -f $clexepref."client".$EXE_EXT) ||
- die "$0: server and/or client need to be built!\n";
+###############################################################################
-$SV = Process::Create ($svexepref."server".$EXE_EXT,
- $svflags.
- $svnsflags);
+my $SV = new PerlACE::Process ("../IDL_Cubit/server", $svflags . $svnsflags);
+my $CL = new PerlACE::Process ("client", "$clflags $clnsflags -x");
-# Put in a wait between the server and client
+if (! (-x $SV->Executable () && -x $CL->Executable)) {
+ print STDERR "ERROR: server and/or client missing or not executable!\n";
+ exit 1;
+}
+
+# Make sure the file is gone, so we can wait on it.
+unlink $iorfile;
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($clexepref . "client".$EXE_EXT,
- " $clflags $clnsflags -x");
+$client = $CL->SpawnWaitKill (60);
+$server = $SV->WaitKill (10);
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (10);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
index f3d52ad8721..738d2c8fa96 100755
--- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
+++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
@@ -11,259 +11,137 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# Do not use environment variables here since not all platforms use ACE_ROOT
use lib "../../../../../bin";
-
+use PerlACE::Run_Test;
use English;
-require Process;
-require ACEutils;
-$iorfile = "cubit.ior";
-$exepref = '.' . $DIR_SEPARATOR;
+$status = 0;
+
+$iorfile = PerlACE::LocalFile ("cubit.ior");
+$iiop_lite_conf = PerlACE::LocalFile ("iiop_lite.conf");
+$uiop_lite_conf = PerlACE::LocalFile ("uiop_lite.conf");
+$server_shmiop_conf = PerlACE::LocalFile ("server_shmiop.conf");
+
$svnsflags = " -f $iorfile";
$clnsflags = " -f $iorfile";
$clflags = "";
$svflags = "";
-$quietflag = "-q";
-$liteflag = "";
-$svliteflag = "";
-$clliteflag = "";
+$quietflag = " -q ";
+$giopliteflag = 0;
+
+###############################################################################
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-n num] [-sleeptime t]",
- " [-debug] [-release] [-orblite] [-verbose]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-n num -- client uses <num> iterations\n";
- print "-sleeptime t -- run_test should sleep for <t> seconds between running\n";
- print " the server and client (default is 5 seconds)\n";
- print "-debug -- sets the debug flag for both client and server\n";
- print "-release -- runs the Release version of the test (for NT use)\n";
- print "-orblite -- Use the lite version of the orb";
- exit;
- }
- if ($ARGV[$i] eq "-debug")
- {
- $clflags .= " -d";
- $svflags .= " -d";
- last SWITCH;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-n num] [-debug] [-orblite] [-verbose]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-n num -- client uses <num> iterations\n";
+ print "-debug -- sets the debug flag for both client and "
+ . "server\n";
+ print "-orblite -- Use the lite version of the orb";
+ exit;
}
- if ($ARGV[$i] eq "-release")
- {
- $exepref = "Release".$DIR_SEPARATOR;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-debug") {
+ $clflags .= " -d ";
+ $svflags .= " -d ";
}
- if ($ARGV[$i] eq "-n")
- {
- $clflags .= " -n $ARGV[$i + 1]";
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-n") {
+ $clflags .= " -n $ARGV[$i + 1] ";
+ $i++;
}
- if ($ARGV[$i] eq "-sleeptime")
- {
- $ACE::sleeptime = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq " -orblite ") {
+ $giopliteflag = 1;
}
- if ($ARGV[$i] eq "-orblite")
- {
- $liteflag = "uselite";
- last SWITCH;
+ elsif ($ARGV[$i] eq " -verbose ") {
+ $quietflag = "";
}
- if ($ARGV[$i] eq "-verbose")
- {
- $quietflag = "";
- last SWITCH;
+ else {
+ print STDERR "ERROR: Unknown Option: ".$ARGV[$i]."\n";
}
- print "run_test: Unknown Option: ".$ARGV[$i]."\n";
- }
}
-(-f $exepref."server".$EXE_EXT &&
- -f $exepref."client".$EXE_EXT) ||
- die "$0: server and/or client need to be built!\n";
-
-unlink $iorfile;
-
-sleep 2;
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client");
-print stderr "\nRunning IDL_Cubit with the default ORB protocol.\n\n";
+###############################################################################
+# run_test_helper
-if ($liteflag eq "uselite")
+sub run_test_helper ()
{
- $svliteflag = "-ORBSvcConf iiop_lite.conf";
- $clliteflag = "-ORBSvcConf iiop_lite.conf";
- print stderr "\nRunning IDL_Cubit with the a lite ORB protocol.\n\n";
-}
-
-$SV = Process::Create ($exepref."server".$EXE_EXT,
- $svflags.
- $svliteflag.
- $svnsflags);
-
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-$CL = Process::Create ($exepref . "client".$EXE_EXT,
- " $quietflag $clflags $clnsflags $clliteflag -x");
+ $SV->Spawn ();
-$client = $CL->TimedWait (120);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
-
-$server = $SV->TimedWait (10);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
-
-unlink $iorfile;
+ if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+ }
-if ($server != 0) {
- print STDERR "ERROR: server error status $server\n";
-}
+ my $client = $CL->SpawnWaitKill (120);
+ my $server = $SV->WaitKill (30);
+
+ unlink $iorfile;
-if ($client != 0) {
- print STDERR "ERROR: client error status $client\n";
-}
+ if ($server != 0) {
+ print STDERR "ERROR: server error status $server\n";
+ $status = 1;
+ }
-if ($server != 0 || $client != 0) {
- exit 1;
+ if ($client != 0) {
+ print STDERR "ERROR: client error status $client\n";
+ $status = 1;
+ }
}
-if ($OSNAME ne "MSWin32")
-{
- # Only run the UIOP test on Unix platforms.
-
- Process::Wait();
-
- # No need to unlink the iorfile again.
- # unlink $iorfile;
+###############################################################################
- sleep 2;
-
- print stderr "\nRunning IDL_Cubit with the UIOP protocol.\n\n";
- if ($liteflag eq "uselite")
- {
- $svliteflag = "-ORBSvcConf uiop_lite.conf";
- $clliteflag = "-ORBSvcConf uiop_lite.conf";
- print stderr "\nRunning IDL_Cubit with the a UIOP lite ORB protocol.\n\n";
- }
-
- # Save the original server flags.
- $save_svflags = $svflags;
-
- $svflags .= " -ORBEndpoint uiop://";
-
- $SV = Process::Create ($exepref."server".$EXE_EXT,
- $svflags.
- $svliteflag.
- $svnsflags);
-
- if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $CL = Process::Create ($exepref . "client".$EXE_EXT,
- " $quietflag $clflags $clnsflags $clliteflag -x");
-
- $client = $CL->TimedWait (120);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
-
- $server = $SV->TimedWait (30);
- if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- }
-
- # Restore the original server flags
- $svflags = $save_svflags;
-
- unlink $iorfile;
-
- if ($server != 0) {
- print STDERR "ERROR: server error status $server\n";
- }
-
- if ($client != 0) {
- print STDERR "ERROR: client error status $client\n";
- }
-
- if ($server != 0 || $client != 0) {
+if (! (-x $SV->Executable () && -x $CL->Executable)) {
+ print STDERR "ERROR: server and/or client missing or not executable!\n";
exit 1;
- }
}
-# Run the SHMIOP test.
-
-Process::Wait();
-
-# No need to unlink the iorfile again.
-# unlink $iorfile;
-
-sleep 2;
+unlink $iorfile;
-print stderr "\nRunning IDL_Cubit with the SHMIOP protocol.\n\n";
+print STDERR "============================================================\n";
+print STDERR "Running IDL_Cubit with the default ORB protocol.\n\n";
-# Save the original server flags.
-$save_svflags = $svflags;
+$SV->Arguments ($svflags . $svnsflags);
+$CL->Arguments ($clflags . $clnsflags . $quietflag . " -x ");
-$svflags .= " -ORBEndpoint shmiop:// -ORBSvcconf server_shmiop.conf ";
+if ($giopliteflag) {
+ print STDERR "\nRunning IDL_Cubit with the a lite ORB protocol.\n\n";
+ $SV->Arguments ($SV->Arguments () . " -ORBSvcConf $iiop_lite_conf ");
+ $CL->Arguments ($CL->Arugments () . " -ORBSvcConf $iiop_lite_conf ");
+}
-$SV = Process::Create ($exepref."server".$EXE_EXT,
- $svflags.
- $svnsflags);
+run_test_helper ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+if ($OSNAME ne "MSWin32") {
+ print STDERR "============================================================\n";
+ print STDERR "Running IDL_Cubit with the UIOP protocol.\n\n";
-$CL = Process::Create ($exepref . "client".$EXE_EXT,
- " $quietflag $clflags $clnsflags -x");
+ $SV->Arguments ($svflags . $svnsflags . " -ORBEndpoint uiop:// ");
+ $CL->Arguments ($clflags . $clnsflags . $quietflag . " -x ");
-$client = $CL->TimedWait (120);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
+ if ($giopliteflag) {
+ print STDERR "\nRunning IDL_Cubit with the a UIOP lite ORB protocol.\n\n";
+ $SV->Arguments ($SV->Arguments () . " -ORBSvcConf $uiop_lite_conf ");
+ $CL->Arguments ($CL->Arugments () . " -ORBSvcConf $uiop_lite_conf ");
+ }
-$server = $SV->TimedWait (30);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+ run_test_helper ();
}
-# Restore the original server flags
-$svflags = $save_svflags;
-
-unlink $iorfile;
+print STDERR "============================================================\n";
+print STDERR "Running IDL_Cubit with the SHMIOP protocol.\n\n";
-if ($server != 0) {
- print STDERR "ERROR: server error status $server\n";
-}
+$SV->Arguments ($svflags . $svnsflags
+ . " -ORBEndpoint shmiop:// -ORBSvcconf $server_shmiop_conf ");
+$CL->Arguments ($clflags . $clnsflags . $quietflag . " -x ");
-if ($client != 0) {
- print STDERR "ERROR: client error status $client\n";
-}
+run_test_helper ();
-if ($server != 0 || $client != 0) {
- exit 1;
-}
+# Clean up SHMIOP files
+unlink glob ("server_shmiop_*");
-exit 0;
+exit $status;
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 36de02e21a5..559bdaac458 100755
--- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
+++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl
@@ -11,7 +11,6 @@ use lib "../../../../../bin";
use PerlACE::Run_Test;
$iorfile = PerlACE::LocalFile ("mtcubit.ior");
-$sleeptime = 3;
$iterations = 1000;
$low_priority_threads = 1;
$thread_per_rate = '';
@@ -57,19 +56,19 @@ $CL = new PerlACE::Process ("client", "$thread_per_rate -f $iorfile -t $threads
$SV->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
$client = $CL->SpawnWaitKill (180);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill ();
-}
-
$SV->Kill ();
unlink $iorfile;
-exit $client == 0 ? 0 : 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ exit 1;
+}
+
+exit 0;