summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/CosEC_Multiple
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/CosEC_Multiple')
-rw-r--r--TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp8
-rwxr-xr-xTAO/orbsvcs/tests/CosEC_Multiple/run_test.pl50
-rwxr-xr-xTAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl31
3 files changed, 64 insertions, 25 deletions
diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp b/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp
index afcc867ed5b..5b7ea6529d7 100644
--- a/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp
+++ b/TAO/orbsvcs/tests/CosEC_Multiple/CosEC_Multiple.cpp
@@ -19,14 +19,14 @@ CosEC_Multiple::~CosEC_Multiple (void)
int
CosEC_Multiple::init (int argc, char *argv[])
{
- if (this->parse_args (argc, argv) == -1)
+ if (init_ORB (argc, argv) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "parse error returned error.\n"),
+ "init_ORB returned error.\n"),
-1);
- if (init_ORB (argc, argv) == -1)
+ if (this->parse_args (argc, argv) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- "init_ORB returned error.\n"),
+ "parse error returned error.\n"),
-1);
if (init_CosEC () == -1)
diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl b/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl
index 78ee631e29b..e02c14efbf2 100755
--- a/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl
+++ b/TAO/orbsvcs/tests/CosEC_Multiple/run_test.pl
@@ -8,10 +8,12 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "../../../../bin";
require ACEutils;
+use Cwd;
#event count
$ev_count = 2;
$status = 0;
+$port = ACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0
# setup CosEC params such that..
# cos event service name = "cosec1"
@@ -28,44 +30,50 @@ $CosEC2_params = "-n cosec2 -e 20 -o 5 -p \"6 21\"";
sub cosec_multiple_test1
{
# first start the Naming service..
- $SV1 = Process::Create ("..".$DIR_SEPARATOR
+ $SV1 = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
."..".$DIR_SEPARATOR
."Naming_Service".$DIR_SEPARATOR
- ."Naming_Service".$EXE_EXT, "");
+ ."Naming_Service".$EXE_EXT,
+ "-ORBNameServicePort $port");
sleep 10;
# now start the Rt EC..
- $SV2 = Process::Create ("..".$DIR_SEPARATOR
+ $SV2 = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
."..".$DIR_SEPARATOR
."Event_Service".$DIR_SEPARATOR
- ."Event_Service".$EXE_EXT, "-t new");
+ ."Event_Service".$EXE_EXT,
+ "-t new -ORBNameServicePort $port");
sleep 10;
# now start the CosEC1..
- $SV3 = Process::Create ("..".$DIR_SEPARATOR
+ $SV3 = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
."..".$DIR_SEPARATOR
."CosEvent_Service".$DIR_SEPARATOR
- ."CosEvent_Service".$EXE_EXT, $CosEC1_params);
+ ."CosEvent_Service".$EXE_EXT,
+ "-ORBNameServicePort $port $CosEC1_params");
sleep 10;
# now start the CosEC2..
- $SV4 = Process::Create ("..".$DIR_SEPARATOR
+ $SV4 = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
."..".$DIR_SEPARATOR
."CosEvent_Service".$DIR_SEPARATOR
- ."CosEvent_Service".$EXE_EXT, $CosEC2_params);
+ ."CosEvent_Service".$EXE_EXT,
+ "-ORBNameServicePort $port $CosEC2_params");
sleep 10;
#start 1 consumer that uses CosEC1 to receive events
- $CONS = Process::Create ($EXEPREFIX."consumer".$EXE_EXT, "-n cosec1 -c $ev_count");
+ $CONS = Process::Create ($EXEPREFIX."consumer".$EXE_EXT,
+ "-ORBNameServicePort $port -n cosec1 -c $ev_count");
sleep 10;
#start 1 supplier that uses CosEC2 to send events
- $SUPP = Process::Create ($EXEPREFIX."supplier".$EXE_EXT, "-n cosec2 -c $ev_count");
+ $SUPP = Process::Create ($EXEPREFIX."supplier".$EXE_EXT,
+ "-ORBNameServicePort $port -n cosec2 -c $ev_count");
sleep 10;
@@ -86,12 +94,14 @@ sub cosec_multiple_test1
#----------
#start 1 consumer that uses CosEC1 to receive events
- $CONS2 = Process::Create ($EXEPREFIX."consumer".$EXE_EXT, "-n cosec2 -c $ev_count");
+ $CONS2 = Process::Create ($EXEPREFIX."consumer".$EXE_EXT,
+ "-ORBNameServicePort $port -n cosec2 -c $ev_count");
sleep 10;
#start 1 supplier that uses CosEC2 to send events
- $SUPP2 = Process::Create ($EXEPREFIX."supplier".$EXE_EXT, "-n cosec1 -c $ev_count");
+ $SUPP2 = Process::Create ($EXEPREFIX."supplier".$EXE_EXT,
+ "-ORBNameServicePort $port -n cosec1 -c $ev_count");
sleep 10;
@@ -142,7 +152,7 @@ for ($i = 0; $i <= $#ARGV; $i++)
{
if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
{
- print "usage: run_test.pl -e event_count -h help\n";
+ print "usage: run_test.pl [-chorus <target>] -e event_count -h help\n";
exit;
}
if ($ARGV[$i] eq "-e")
@@ -151,7 +161,19 @@ for ($i = 0; $i <= $#ARGV; $i++)
$i++;
last SWITCH;
}
-}
+ if ($ARGV[$i] eq '-chorus') {
+ $i++;
+ if (defined $ARGV[$i]) {
+ $cwd = getcwd();
+ $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR";
+ }
+ else {
+ print STDERR "The -chorus option requires the hostname of the target\n";
+ exit(1);
+ }
+ last SWITCH;
+ }
+ }
}
cosec_multiple_test1 ();
diff --git a/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl b/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl
index 6a00abf4556..2b1114cbaa0 100755
--- a/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl
+++ b/TAO/orbsvcs/tests/CosEC_Multiple/run_test2.pl
@@ -8,26 +8,31 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "../../../../bin";
require ACEutils;
+use Cwd;
$con_count = 10;
$sup_count = 10;
$ev_count = 8;
$status = 0;
+$port = ACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0
sub cosec_multiple_test2
{
# first start the Naming service..
- $SV1 = Process::Create ($EXEPREFIX."../../Naming_Service/Naming_Server".$EXE_EXT, "");
+ $SV1 = Process::Create ($EXEPREFIX."../../Naming_Service/Naming_Service".$EXE_EXT,
+ "-ORBNameServicePort $port");
sleep 10;
# now start the Rt EC..
- $SV2 = Process::Create ($EXEPREFIX."../../Event_Service/Event_Service".$EXE_EXT, "");
+ $SV2 = Process::Create ($EXEPREFIX."../../Event_Service/Event_Service".$EXE_EXT,
+ "-ORBNameServicePort $port");
sleep 10;
# now start the CosEC1..
- $SV3 = Process::Create ($EXEPREFIX."../../CosEvent_Service/CosEvent_Service".$EXE_EXT, "");
+ $SV3 = Process::Create ($EXEPREFIX."../../CosEvent_Service/CosEvent_Service".$EXE_EXT,
+ "-ORBNameServicePort $port");
sleep 10;
@@ -36,7 +41,7 @@ sub cosec_multiple_test2
{
print "creating consumer# $cntr1\n";
$CONS = Process::Create ($EXEPREFIX."consumer".$EXE_EXT,
- "-c $ev_count");
+ "-ORBNameServicePort $port -c $ev_count");
sleep 10;
}
@@ -46,7 +51,7 @@ sub cosec_multiple_test2
{
print "creating supplier# $cntr2\n";
$SUPP = Process::Create ($EXEPREFIX."supplier".$EXE_EXT,
- "-c $ev_count");
+ "-ORBNameServicePort $port -c $ev_count");
sleep 10;
}
@@ -86,7 +91,7 @@ for ($i = 0; $i <= $#ARGV; $i++)
{
if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
{
- print "usage: run_test2.pl -e event_count -c consumers -s suppliers -h help\n";
+ print "usage: run_test2.pl [-chorus <target>] -e event_count -c consumers -s suppliers -h help\n";
exit;
}
if ($ARGV[$i] eq "-e")
@@ -107,7 +112,19 @@ for ($i = 0; $i <= $#ARGV; $i++)
$i++;
last SWITCH;
}
-}
+ if ($ARGV[$i] eq '-chorus') {
+ $i++;
+ if (defined $ARGV[$i]) {
+ $cwd = getcwd();
+ $EXEPREFIX = "rsh $ARGV[$i] arun $cwd$DIR_SEPARATOR";
+ }
+ else {
+ print STDERR "The -chorus option requires the hostname of the target\n";
+ exit(1);
+ }
+ last SWITCH;
+ }
+ }
}