diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-12-03 03:49:41 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-12-03 03:49:41 +0000 |
commit | a34f63ba140fbd78ac1fdadce193244dff8ca6c7 (patch) | |
tree | 72ac44ed6eee15ed5ed814454acce8498d5f3cd9 | |
parent | 452a5c7d229d2adbff87611d6c179f9ab2495562 (diff) | |
download | ATCD-a34f63ba140fbd78ac1fdadce193244dff8ca6c7.tar.gz |
*** empty log message ***
6 files changed, 187 insertions, 14 deletions
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic-remote.cad b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic-remote.cad new file mode 100644 index 00000000000..da0abf2387b --- /dev/null +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic-remote.cad @@ -0,0 +1,55 @@ +<?xml version="1.0"?> <!-- -*- SGML -*- --> + +<!-- If this file is moved to a different directory, make sure to change the + path to the DTD below. Otherwise the examples won't work. --> +<!DOCTYPE componentassembly SYSTEM "../../../../docs/XML/componentassembly.dtd"> + +<componentassembly id="A basic remote assembly for baseline performance of RTCCM Priority components."> + <componentfiles> + <componentfile id="com-Controller"> + <fileinarchive name="Controller.csd"/> + </componentfile> + <componentfile id="com-Worker"> + <fileinarchive name="CB_Worker.csd"/> + </componentfile> + </componentfiles> + + <partitioning> + + <!-- A plain vanilla partition. We don't even need the processcollocation tag here. --> + <homeplacement id="a_ControllerHome"> + <componentfileref idref="com-Controller"/> + <componentinstantiation id="a_Controller"> + <registercomponent> + <!-- writeiortofile is a non-standard CIAO extension. --> + <writeiortofile name="controller.ior"/> + </registercomponent> + </componentinstantiation> + </homeplacement> + + <processcollocation> + <homeplacement id="a_WorkerHome"> + <componentfileref idref="com-Worker"/> + <componentinstantiation id="a_Worker"/> + </homeplacement> + <destination>Remote</destination> + </processcollocation> + + </partitioning> + + <connections> + + <connectinterface> + <usesport> + <usesidentifier>worker</usesidentifier> + <componentinstantiationref idref="a_Controller"/> + </usesport> + <providesport> + <providesidentifier>some_device</providesidentifier> + <componentinstantiationref idref="a_Worker"/> + </providesport> + </connectinterface> + + </connections> + +</componentassembly> diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_remote.pl b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_remote.pl new file mode 100755 index 00000000000..5c8db6df7dd --- /dev/null +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_remote.pl @@ -0,0 +1,99 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +# +# @@ Run this script from ../descriptors/ instead. +# + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$status = 0; +$assembly = PerlACE::LocalFile ("basic-remote.cad"); +$am_ior = PerlACE::LocalFile ("am.ior"); +$controller_ior = PerlACE::LocalFile ("controller.ior"); +$cookie = PerlACE::LocalFile ("ck_demo_deployment"); +$topo_config = PerlACE::LocalFile ("remote.dat"); + +$ACE_ROOT=$ENV{'ACE_ROOT'}; +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +if ($CIAO_ROOT eq "") { + $CIAO_ROOT="$ACE_ROOT/TAO/CIAO"; +} + +unlink $am_ior; +unlink $cookie; + + +$assembly_manager_args = "-o $am_ior -c $topo_config"; + +$ad_deploy = " -k file://$am_ior -o $cookie -a demo.cad"; + +$ad_teardown = " -k file://$am_ior -d $cookie -x"; + +## Starting up the CIAO Assembly Manager +$AM = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Manager", + $assembly_manager_args); +$AM->Spawn (); +if (PerlACE::waitforfile_timed ($am_ior, 15) == -1) { + print STDERR "ERROR: Could not find assembly ior file <$am_ior>\n"; + $AM->Kill (); + exit 1; +} + +## Now actually deploy the application +$AD = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer", + $ad_deploy); +if ($AD->SpawnWaitKill (60) == -1) { + print STDERR "ERROR: Failed to deploy assembly file <$assembly>\n"; + $AD->Kill (); + $AM->Kill (); +} + +## Make sure the application is up and running +if (PerlACE::waitforfile_timed ($controller_ior, 15) == -1) { + print STDERR "ERROR: Could not find controller ior file <$controller_ior>\n"; + $AM->Kill (); + exit 1; +} + +for ($work = 10; $work < 400; $work += 20) +{ + printf "Test work: $work\n"; + +#Start the client to send the trigger message + $CL = new PerlACE::Process ("../Controllers/client", + "-k file://$controller_ior -w $work"); + $CL->SpawnWaitKill(60); + +## Now wait for the test to complete. Need to figure out a way to +## detect this. + sleep (1); +} + +## Now teardown the application +$AD = new PerlACE::Process("$CIAO_ROOT/tools/Assembly_Deployer/Assembly_Deployer", + $ad_teardown); +if ($AD->SpawnWaitKill (60) == -1) { + print STDERR "ERROR: Failed to teardown assembly file <$assembly>\n"; + $AD->Kill (); + $AM->Kill (); + exit 1; +} + +#$AM->WaitKill(5); +#$AD->WaitKill(5); + +$AM->WaitKill (40); + + +unlink $cookie; +unlink $controller_ior; +unlink $am_ior; + +exit $status; diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl index 0326d814be6..f4778ddbfc7 100755 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/basic_test.pl @@ -22,7 +22,7 @@ if ($CIAO_ROOT eq "") { $status = 0; -$assembly = PerlACE::LocalFile ("demo-50.cad"); +$assembly = PerlACE::LocalFile ("demo.cad"); $deploy_config = PerlACE::LocalFile ("test.dat"); #$deploy_config = PerlACE::LocalFile ("remote.dat"); $daemon_ior = PerlACE::LocalFile ("daemon.ior"); @@ -30,10 +30,12 @@ $am_ior = PerlACE::LocalFile ("am.ior"); $controller_ior = PerlACE::LocalFile ("controller.ior"); $cookie = PerlACE::LocalFile ("ck_demo_deployment"); +$compserver="$CIAO_ROOT/tools/ComponentServer/ComponentServer"; + ## The following control how to iterate thru various work amount $start_work = 10; -$end_work = 300; -$work_step = 300; +$end_work = 400; +$work_step = 10; $run_time = 30; # run for $run_time sec. unlink $daemon_ior; @@ -65,7 +67,7 @@ while ( $#ARGV >= 0) } # CIAO Daemon command line arguments -$daemon_args1 = "-ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; +$daemon_args1 = "-ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $compserver"; $assembly_manager_args = "-o $am_ior -c $deploy_config"; diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/no-rt-3rates.cad b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/no-rt-3rates.cad index 349857c246e..00aafadf289 100644 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/no-rt-3rates.cad +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/no-rt-3rates.cad @@ -59,6 +59,7 @@ </registercomponent> </componentinstantiation> </homeplacement> + <destination>Remote</destination> </processcollocation> </partitioning> diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/rate_test.pl b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/rate_test.pl index 9f80a0024bf..4232b995315 100755 --- a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/rate_test.pl +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/rate_test.pl @@ -22,9 +22,8 @@ if ($CIAO_ROOT eq "") { $status = 0; +$local = 1; $assembly = PerlACE::LocalFile ("no-rt-3rates.cad"); -$deploy_config = PerlACE::LocalFile ("test.dat"); -#$deploy_config = PerlACE::LocalFile ("remote.dat"); $daemon_ior = PerlACE::LocalFile ("daemon.ior"); $am_ior = PerlACE::LocalFile ("am.ior"); $c25_ior = PerlACE::LocalFile ("c25.ior"); @@ -33,10 +32,10 @@ $c75_ior = PerlACE::LocalFile ("c75.ior"); $cookie = PerlACE::LocalFile ("ck_demo_deployment"); ## The following control how to iterate thru various work amount -$start_work = 10; -$end_work = 300; -$work_step = 300; -$run_time = 10; # run for $run_time sec. +$start_work = 300; +$end_work = 301; +$work_step = 100; +$run_time = 40; # run for $run_time sec. unlink $daemon_ior; unlink $am_ior; @@ -51,8 +50,14 @@ while ( $#ARGV >= 0) if ($ARGV[0] =~ m/^-test_deploy/i) { $test_deploy = 1; } - elsif ($ARGV[0] =~ m/^-no_daemon/i) { - $no_daemon = 1; + elsif ($ARGV[0] =~ m/^-remote/i) { + $local = 0; + } + elsif ($ARGV[0] =~ m/^-assmbly/i) { + shift; + if ($#ARGV >= 0) { + $assembly = PerlACE::LocalFile ("$ARGV[0]"); + } } else { die "Invalid flag: $ARGV[0]\n"; @@ -61,6 +66,13 @@ while ( $#ARGV >= 0) shift; } +if ($local == 1) { + $deploy_config = PerlACE::LocalFile ("test.dat"); +} +else { + $deploy_config = PerlACE::LocalFile ("remote.dat"); +} + # CIAO Daemon command line arguments $daemon_args1 = "-ORBEndpoint iiop://localhost:10000 -o $daemon_ior -i CIAO_Installation_Data.ini -n $CIAO_ROOT/tools/ComponentServer/ComponentServer"; @@ -74,7 +86,7 @@ $ad_teardown = " -k file://$am_ior -d $cookie -x"; $DS = new PerlACE::Process ("$CIAO_ROOT/tools/Daemon/CIAO_Daemon", "$daemon_args1"); -if ($no_daemon == 0) { +if ($local == 1) { ## Starting up the CIAO daemon $DS->Spawn (); if (PerlACE::waitforfile_timed ($daemon_ior, 15) == -1) { @@ -159,7 +171,9 @@ $DS->Kill (); unlink $cookie; -unlink $controller_ior; +unlink $c25_ior; +unlink $c50_ior; +unlink $c75_ior; unlink $daemon_ior; unlink $am_ior; diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/remote.dat b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/remote.dat new file mode 100644 index 00000000000..9b5120043fd --- /dev/null +++ b/TAO/CIAO/tests/RTCCM/Priority_Test/descriptors/remote.dat @@ -0,0 +1,2 @@ +Default corbaloc:iiop:hermione:10000/ServerActivator +Remote corbaloc:iiop:ron:10000/ServerActivator
\ No newline at end of file |