summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl')
-rwxr-xr-xTAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl48
1 files changed, 33 insertions, 15 deletions
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 9ebffecc5b1..627e3d53259 100755
--- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
+++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl
@@ -12,15 +12,19 @@ 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";
-require Process;
require ACEutils;
+$nsport = 20000 + ACE::uniqueid ();
$iorfile = "cubit.ior";
$exepref = '.' . $DIR_SEPARATOR;
$svnsflags = " -o $iorfile";
$clnsflags = " -f $iorfile";
$clflags = "";
$svflags = "";
+$mcast = 0;
+
+# Make sure the file is gone, so we can wait on it.
+unlink $iorfile;
# Parse the arguments
@@ -30,10 +34,11 @@ for ($i = 0; $i <= $#ARGV; $i++)
{
if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
{
- print "run_test [-h] [-n num] [-sleeptime t] [-debug] [-release] [-orblite]\n";
+ print "run_test [-h] [-n num] [-mcast] [-sleeptime t] [-debug] [-release] [-orblite]\n";
print "\n";
print "-h -- prints this information\n";
print "-n num -- client uses <num> iterations\n";
+ print "-mcast -- uses the multicast version of the nameservice\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";
@@ -41,6 +46,13 @@ for ($i = 0; $i <= $#ARGV; $i++)
print "-orblite -- Use the lite version of the orb";
exit;
}
+ if ($ARGV[$i] eq "-mcast")
+ {
+ $mcast = 1;
+ $clnsflags = " -ORBnameserviceport $nsport";
+ $svnsflags = " -ORBnameserviceport $nsport";
+ last SWITCH;
+ }
if ($ARGV[$i] eq "-debug")
{
$clflags .= " -d";
@@ -74,26 +86,32 @@ for ($i = 0; $i <= $#ARGV; $i++)
}
}
-(-f $exepref."server".$EXE_EXT &&
- -f $exepref."client".$EXE_EXT) ||
+(-f $exepref."server".$Process::EXE_EXT &&
+ -f $exepref."client".$Process::EXE_EXT) ||
die "$0: server and/or client need to be built!\n";
-unlink $iorfile;
-
-sleep 2;
-
-$SV = Process::Create ($exepref."server".$EXE_EXT,
+$SV = Process::Create ($exepref."server".$Process::EXE_EXT,
$svflags.
$svnsflags);
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+# Put in a wait between the server and client
+if ($mcast == 1)
+{
+ sleep $ACE::sleeptime;
+}
+else
+{
+ 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,
- " $clflags $clnsflags -x");
+$CL = Process::Create ($exepref . "client".$Process::EXE_EXT.
+ $clflags .
+ $clnsflags .
+ " -x");
$client = $CL->TimedWait (60);
if ($client == -1) {