diff options
author | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-12-13 16:11:31 +0000 |
---|---|---|
committer | wolff1 <wolff1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-12-13 16:11:31 +0000 |
commit | 3d81b31f8aa8289dba1230dd317c76bb78f7c308 (patch) | |
tree | 2935033c0d082a6558550f6cf7ee40ef7a78c1a8 | |
parent | 0f06dc797fbac2a50e8b9607155a3030e56d732e (diff) | |
download | ATCD-3d81b31f8aa8289dba1230dd317c76bb78f7c308.tar.gz |
multiple publisher spawns
-rwxr-xr-x | CIAO/tests/DDS/tests/run_publisher.pl | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/CIAO/tests/DDS/tests/run_publisher.pl b/CIAO/tests/DDS/tests/run_publisher.pl index 027f9a8ff42..ecef600f121 100755 --- a/CIAO/tests/DDS/tests/run_publisher.pl +++ b/CIAO/tests/DDS/tests/run_publisher.pl @@ -16,8 +16,8 @@ $DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE"; $irepo_running = 0; $IREPO = 0; -$publisher_id = "Publisher 1"; -if (@ARGV[0]) {$publisher_id = @ARGV[0];} +$publisher_count = 1; +if (@ARGV[0]) {$publisher_count = @ARGV[0];} # DCPS info repository parameters $svcconf = "../descriptors/tcp.conf"; @@ -60,11 +60,15 @@ if (PerlACE::waitforfile_timed ($repoior, $PerlACE::wait_interval_for_process_cr $irepo_running = 1; -# invoke publisher -print "Invoking DDS publisher\n"; -$pub = new PerlACE::Process ("../Publisher/publisher", - "-ORBSvcConf $svcconf -DCPSConfigFile $dcpsconf -i \"$publisher_id\""); -$pub->Spawn (); +# invoke publishers +$pubs; # list of publisher processes +for $pub_num ( 1 .. $publisher_count) { + print "Invoking DDS publisher $pub_num\n"; + $pubs[$pub_num] = new PerlACE::Process ("../Publisher/publisher", + "-ORBSvcConf $svcconf -DCPSConfigFile " . + "$dcpsconf -i \"Publisher No $pub_num\""); + $pubs[$pub_num]->Spawn (); +} print "\n*************************************************************************\n"; print "* Press any key to shutdown the test ...\n"; @@ -72,9 +76,11 @@ print "************************************************************************* $confirmation = <STDIN>; # Invoke executor - stop the application -. -print "killing the publisher\n"; -$pub->Kill (); -$pub->TimedWait (1); +for $pub_num ( 1 .. $publisher_count) { + print "killing the publisher $pub_num\n"; + $pubs[$pub_num]->Kill (); + $pubs[$pub_num]->TimedWait (1); +} kill_open_processes (); delete_output_files (); |