diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-06 22:05:52 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-06 22:05:52 +0000 |
commit | 2272c23e99085970207fad3ac22458ad741f57d8 (patch) | |
tree | a29e02d0814be39a6abc43c3b9e893c39caca555 /TAO/examples | |
parent | 1711d9621a49e4dbaf39fccc2c732c577d3d5ff6 (diff) | |
download | ATCD-2272c23e99085970207fad3ac22458ad741f57d8.tar.gz |
ChangeLogTag:Tue Mar 6 13:44:38 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/examples')
-rw-r--r-- | TAO/examples/Quoter/Factory_Finder.cpp | 21 | ||||
-rw-r--r-- | TAO/examples/Quoter/Generic_Factory.cpp | 21 | ||||
-rw-r--r-- | TAO/examples/Quoter/README | 43 | ||||
-rw-r--r-- | TAO/examples/Quoter/client.cpp | 3 | ||||
-rwxr-xr-x | TAO/examples/Quoter/run_test.pl | 271 | ||||
-rw-r--r-- | TAO/examples/Quoter/server.cpp | 21 | ||||
-rwxr-xr-x | TAO/examples/Quoter/testall.pl | 206 |
7 files changed, 125 insertions, 461 deletions
diff --git a/TAO/examples/Quoter/Factory_Finder.cpp b/TAO/examples/Quoter/Factory_Finder.cpp index 370424c78cc..eb31f25435a 100644 --- a/TAO/examples/Quoter/Factory_Finder.cpp +++ b/TAO/examples/Quoter/Factory_Finder.cpp @@ -67,10 +67,12 @@ Quoter_Factory_Finder_Server::init (int argc, // Activate the POA manager exception_message = "While activating the POA manager"; - if (this->orb_manager_.activate_poa_manager (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1); + int result = this->orb_manager_.activate_poa_manager (ACE_TRY_ENV); ACE_TRY_CHECK; + if (result == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1); + // Copy them, because parse_args expects them there. this->argc_ = argc; this->argv_ = argv; @@ -100,7 +102,7 @@ Quoter_Factory_Finder_Server::init (int argc, // Get the Naming Service object reference. exception_message = "While resolving the Name Service"; CORBA::Object_var namingObj_var = - orb_manager_.orb()->resolve_initial_references ("NameService"); + orb_manager_.orb()->resolve_initial_references ("NameService", ACE_TRY_ENV); ACE_TRY_CHECK; if (CORBA::is_nil (namingObj_var.in ())) @@ -140,9 +142,13 @@ Quoter_Factory_Finder_Server::init (int argc, quoter_Factory_Finder_Name_.length (1); quoter_Factory_Finder_Name_[0].id = CORBA::string_dup ("Quoter_Factory_Finder"); + exception_message = "Factory_Factory::_this"; + CORBA::Object_var ff_obj = this->quoter_Factory_Finder_i_ptr_->_this(ACE_TRY_ENV); + ACE_TRY_CHECK; + exception_message = "While binding the Factory Finder"; quoterNamingContext_var_->bind (quoter_Factory_Finder_Name_, - this->quoter_Factory_Finder_i_ptr_->_this(ACE_TRY_ENV), + ff_obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; @@ -164,8 +170,6 @@ Quoter_Factory_Finder_Server::init (int argc, int Quoter_Factory_Finder_Server::run (CORBA::Environment &ACE_TRY_ENV) { - ACE_UNUSED_ARG (ACE_TRY_ENV); - if (this->debug_level_ >= 1) ACE_DEBUG ((LM_DEBUG, "\nQuoter Example: Quoter_Factory_Finder_Server is running\n")); @@ -219,7 +223,10 @@ main (int argc, char *argv []) ACE_TRY_NEW_ENV { - if (quoter_Factory_Finder_Server.init (argc,argv,ACE_TRY_ENV) == -1) + int result = quoter_Factory_Finder_Server.init (argc, argv, ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (result == -1) return 1; else { diff --git a/TAO/examples/Quoter/Generic_Factory.cpp b/TAO/examples/Quoter/Generic_Factory.cpp index 87499fafe18..d2fdbe0b8c6 100644 --- a/TAO/examples/Quoter/Generic_Factory.cpp +++ b/TAO/examples/Quoter/Generic_Factory.cpp @@ -58,18 +58,23 @@ Quoter_Generic_Factory_Server::init (int argc, ACE_TRY { + int result = 0; // Initialize the ORB Manager exception_message = "While initing the orb_manager"; - if (this->orb_manager_.init (argc, argv, ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); + result = this->orb_manager_.init (argc, argv, ACE_TRY_ENV); ACE_TRY_CHECK; + if (result == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); + // Activate the POA manager exception_message = "While activating the POA manager"; - if (this->orb_manager_.activate_poa_manager (ACE_TRY_ENV) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1); + result = this->orb_manager_.activate_poa_manager (ACE_TRY_ENV); ACE_TRY_CHECK; + if (result == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activate_poa_manager"), -1); + // Copy them, because parse_args expects them there. this->argc_ = argc; this->argv_ = argv; @@ -98,7 +103,7 @@ Quoter_Generic_Factory_Server::init (int argc, // Get the Naming Service object reference. exception_message = "While getting the Naming Service Reference"; CORBA::Object_var namingObj_var = - orb_manager_.orb()->resolve_initial_references ("NameService"); + orb_manager_.orb()->resolve_initial_references ("NameService", ACE_TRY_ENV); ACE_TRY_CHECK; if (CORBA::is_nil (namingObj_var.in ())) @@ -148,9 +153,13 @@ Quoter_Generic_Factory_Server::init (int argc, quoter_Generic_Factory_Name.length (1); quoter_Generic_Factory_Name[0].id = CORBA::string_dup ("Quoter_Generic_Factory"); + exception_message = "Generic_Factory::_this"; + CORBA::Object_var gf_obj = this->quoter_Generic_Factory_i_ptr_->_this(ACE_TRY_ENV); + ACE_TRY_CHECK; + exception_message = "While binding the Generic Factory"; quoterNamingContext_var_->bind (quoter_Generic_Factory_Name, - this->quoter_Generic_Factory_i_ptr_->_this(ACE_TRY_ENV), + gf_obj.in (), ACE_TRY_ENV); ACE_TRY_CHECK; diff --git a/TAO/examples/Quoter/README b/TAO/examples/Quoter/README index f183f8d809d..35bddc465a8 100644 --- a/TAO/examples/Quoter/README +++ b/TAO/examples/Quoter/README @@ -76,46 +76,3 @@ client: Creates one Quoter through using the Quoter_Factory_Finder. After that The objects are invoked in the following order: client->Quoter->Quoter_Factory_Finder->Quoter_Life_Cycle_Service ->Quoter_Generic_Factory->Quoter_Factory - - -RUNNING THE EXAMPLE -=================== - -run_test - -Name Server ------------ - -Found under TAO\Orbsvcs, this is run for connections from the -server, client, and factory finder. Plans to move this into the -server are under consideration. - -To run with the default settings, use - -run_tests /ns - -Quoter Server -------------- - -To run with the default settings, use - -run_tests /sv - - -Quoter Client -------------- - -To run with the default settings, use - -run_tests /cl - -Quoter Factory Finder ---------------------- - -To run with the default settings, use - -run_tests /ff - -Quoter example -------------- - diff --git a/TAO/examples/Quoter/client.cpp b/TAO/examples/Quoter/client.cpp index d5656a51bb1..8f369d7c6b3 100644 --- a/TAO/examples/Quoter/client.cpp +++ b/TAO/examples/Quoter/client.cpp @@ -163,7 +163,8 @@ Quoter_Client::init_naming_service (void) { // Resolve the Naming Service CORBA::Object_var naming_obj = - orb_->resolve_initial_references ("NameService"); + orb_->resolve_initial_references ("NameService", ACE_TRY_ENV); + ACE_TRY_CHECK; if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/examples/Quoter/run_test.pl b/TAO/examples/Quoter/run_test.pl index 33f065d2ffc..38db087841c 100755 --- a/TAO/examples/Quoter/run_test.pl +++ b/TAO/examples/Quoter/run_test.pl @@ -8,11 +8,10 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # This is a Perl script that runs the client and all the other servers that # are needed. -unshift @INC, '../../../bin'; -require Process; -#require Uniqueid; +use lib '../../../bin'; +use PerlACE::Run_Test; -$nsiorfile = "ns.ior"; +$nsiorfile = PerlACE::LocalFile ("ns.ior"); # number of threads to use for multithreaded clients or servers @@ -26,227 +25,115 @@ $sleeptime = 2; $status = 0; $n = 1; -$leave = 1; $debug = ""; $cm = ""; $sm = ""; -$other = ""; -$c_conf = ""; #-ORBsvcconf client.conf"; -$s_conf = ""; #-ORBsvcconf server.conf"; - -# Programs that are run - -$name_server = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."orbsvcs$DIR_SEPARATOR". - "Naming_Service$DIR_SEPARATOR"."Naming_Service$EXE_EXT"; -$lifecycle_server = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."orbsvcs$DIR_SEPARATOR". - "LifeCycle_Service$DIR_SEPARATOR"."LifeCycle_Service$EXE_EXT"; -$quoter_server = $EXE_PREFIX."server$EXE_EXT"; -$factory_finder = $EXE_PREFIX."Factory_Finder$EXE_EXT"; -$generic_factory = $EXE_PREFIX."Generic_Factory$EXE_EXT"; -$quoter_client = $EXE_PREFIX."client$EXE_EXT"; - -sub name_server -{ - my $args = "$other -o $nsiorfile"; - $NS = Process::Create ($name_server, $args); -} - -sub lifecycle_server -{ - my $args = "$other $debug -ORBInitRef NameService=file://$nsiorfile"; - $LC = Process::Create ($lifecycle_server, $args); -} - -sub server -{ - my $args = "$other $debug $sm ". - "-ORBInitRef NameService=file://$nsiorfile $s_conf"; - - $SV = Process::Create ($quoter_server, $args); -} - -sub factory_finder -{ - my $args = "$other $debug -ORBInitRef NameService=file://$nsiorfile"; - - $FF = Process::Create ($factory_finder, $args); -} - -sub generic_factory -{ - my $args = "$other -l $debug -ORBInitRef NameService=file://$nsiorfile"; - - $GF = Process::Create ($generic_factory, $args); -} - -sub client -{ - my $args = "$other -l $debug $cm ". - "-ORBInitRef NameService=file://$nsiorfile $c_conf"; - for ($j = 0; $j < $n; $j++) - { - $client_ = Process::Create($quoter_client, $args); - if ( $client_->TimedWait (60) ) { - print STDERR "ERROR: a client has timedout\n"; - $status = 1; - $client_->Kill (); $client_->TimedWait (1); - } - } -} # Parse the arguments -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "run_test [-n num] [-leave] [-onewin]". - "[-twowin] [-d level] [-h] [-nt] [-cm] [-sm] [-ns|sv|ff|cl|gf]\n"; - print "\n"; - print "-n num -- runs the client num times\n"; - print "-leave -- leaves the servers running and their windows open\n"; - print "-onewin -- keeps all tests in one window on NT\n"; - print "-twowin -- put each test in a separate window on NT\n"; - print "-d level -- runs each at debug level <level>\n"; - print "-h -- prints this information\n"; - print "-nt num -- number of threads in the client (twice for server)\n"; - print " make sure this is before any -cm or -sm\n"; - print "-cm -- use more than one thread in the client\n"; - print "-sm -- use more than one thread in the server\n"; - print "-ns -sv -ff -gf -cl -- runs only one of the executables\n"; - exit; - } - if ($ARGV[$i] eq "-n") - { +for ($i = 0; $i <= $#ARGV; $i++) { + if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { + print "run_test [-n num] [-d level] [-h] [-nt] [-cm] [-sm]\n"; + print "\n"; + print "-n num -- runs the client num times\n"; + print "-d level -- runs each at debug level <level>\n"; + print "-h -- prints this information\n"; + print "-nt num -- number of threads in the client (twice for server)\n"; + print " make sure this is before any -cm or -sm\n"; + print "-cm -- use more than one thread in the client\n"; + print "-sm -- use more than one thread in the server\n"; + exit; + } + elsif ($ARGV[$i] eq "-n") { $n = $ARGV[$i + 1]; $i++; - last SWITCH; } - if ($ARGV[$i] eq "-nt") - { + elsif ($ARGV[$i] eq "-nt") { $num_threads = $ARGV[$i + 1]; $i++; - last SWITCH; } - if ($ARGV[$i] eq "-d") - { + elsif ($ARGV[$i] eq "-d") { $debug = $debug." -d $ARGV[$i + 1]"; $i++; - last SWITCH; } - if ($ARGV[$i] eq "-cm") - { + elsif ($ARGV[$i] eq "-cm") { $cm = "-n ".$num_threads; - last SWITCH; } - if ($ARGV[$i] eq "-sm") - { + elsif ($ARGV[$i] eq "-sm") { $sm = "-n ".($num_threads * 3); - last SWITCH; - } - if ($ARGV[$i] eq "-leave") - { - $leave = 0; - last SWITCH; - } - if ($ARGV[$i] eq "-ns") - { - name_server (); - exit; - } - if ($ARGV[$i] eq "-sv") - { - server (); - exit; - } - if ($ARGV[$i] eq "-ff") - { - factory_finder (); - exit; - } - if ($ARGV[$i] eq "-gf") - { - generic_factory (); - exit; - } - if ($ARGV[$i] eq "-cl") - { - client (); - exit; - } - if ($ARGV[$i] eq "-customconf") #secret flag from testall.pl - { - #use a different set of *.conf files - $c_conf = "-ORBsvcconf c.conf"; - $s_conf = "-ORBsvcconf s.conf"; - last SWITCH; - } - if ($ARGV[$i] eq "-onewin") - { - if ($^O eq "MSWin32") - { - $Process::newwindow = "no"; - } - last SWITCH; - } - if ($ARGV[$i] eq "-twowin") - { - if ($^O eq "MSWin32") - { - $Process::newwindow = "yes"; - } - last SWITCH; } - - $other = $other." ".$ARGV[$i]; - } } -name_server (); +# Programs that are run + +$NS = new PerlACE::Process ("../../orbsvcs/Naming_Service/Naming_Service", "-o $nsiorfile"); +$LC = new PerlACE::Process ("../../orbsvcs/LifeCycle_Service/LifeCycle_Service", "$debug -ORBInitRef NameService=file://$nsiorfile"); + +$SV = new PerlACE::Process ("server", "$debug $sm -ORBInitRef NameService=file://$nsiorfile"); +$FF = new PerlACE::Process ("Factory_Finder", "$debug -ORBInitRef NameService=file://$nsiorfile"); +$GF = new PerlACE::Process ("Generic_Factory", "-l $debug -ORBInitRef NameService=file://$nsiorfile"); +$CL = new PerlACE::Process ("client", "-l $debug $cm -ORBInitRef NameService=file://$nsiorfile"); + +$NS->Spawn (); sleep $sleeptime; -lifecycle_server (); + +$LC->Spawn (); sleep $sleeptime; -server (); +$SV->Spawn (); sleep $sleeptime; -factory_finder (); +$FF->Spawn (); sleep $sleeptime; -generic_factory (); +$GF->Spawn (); sleep $sleeptime; -client (); - -if ($leave) -{ - $GF->Terminate (); - $FF->Terminate (); - $SV->Terminate (); - $LC->Terminate (); - $NS->Terminate (); - if ($GF->TimedWait (5) == -1 || - $FF->TimedWait (5) == -1 || - $SV->TimedWait (5) == -1 || - $LC->TimedWait (5) == -1 || - $NS->TimedWait (5) == -1){ - print STDERR "ERROR: couldn't terminate services nicely\n"; + +for ($j = 1; $j <= $n; ++$j) { + $client = $CL->SpawnWaitKill (60); + + if ($client != 0) { + print STDERR "ERROR: client $j returned $client\n"; + $status = 1; + } +} + +$server = $GF->TerminateWaitKill (10); + +if ($server != 0) { + print STDERR "ERROR: Generic Factory returned $server\n"; $status = 1; - $GF->Kill (); $GF->TimedWait (1); - $FF->Kill (); $FF->TimedWait (1); - $SV->Kill (); $SV->TimedWait (1); - $LC->Kill (); $LC->TimedWait (1); - $NS->Kill (); $NS->TimedWait (1); - } } -unlink $nsiorfile; +$server = $FF->TerminateWaitKill (10); + +if ($server != 0) { + print STDERR "ERROR: Factory Finder returned $server\n"; + $status = 1; +} + +$server = $SV->TerminateWaitKill (10); + +if ($server != 0) { + print STDERR "ERROR: Server returned $server\n"; + $status = 1; +} + +$server = $LC->TerminateWaitKill (10); -if ($status != 0) -{ - exit 1; +if ($server != 0) { + print STDERR "ERROR: LifeCycle returned $server\n"; + $status = 1; } -exit 0; +$server = $NS->TerminateWaitKill (10); + +if ($server != 0) { + print STDERR "ERROR: Naming Service returned $server\n"; + $status = 1; +} + +unlink $nsiorfile; + +exit $status; diff --git a/TAO/examples/Quoter/server.cpp b/TAO/examples/Quoter/server.cpp index fb1da3e21c8..d8ea0180d4d 100644 --- a/TAO/examples/Quoter/server.cpp +++ b/TAO/examples/Quoter/server.cpp @@ -67,12 +67,14 @@ Quoter_Server::init (int argc, ACE_TRY { exception_message = "While ORB Manager init"; - if (this->orb_manager_.init (argc, argv, ACE_TRY_ENV) == -1) + int result = this->orb_manager_.init (argc, argv, ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (result == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - ACE_TRY_CHECK; // Copy them, because parse_args expects them there. this->argc_ = argc; @@ -87,7 +89,9 @@ Quoter_Server::init (int argc, this->parse_args (); // Obtain the RootPOA. - CORBA::Object_var obj = this->orb_manager_.orb()->resolve_initial_references ("RootPOA"); + CORBA::Object_var obj = + this->orb_manager_.orb()->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + ACE_TRY_CHECK; // Get the POA_var object from Object_var. exception_message = "While narrowing the root pos"; @@ -128,9 +132,11 @@ Quoter_Server::init (int argc, exception_message = "While object_to_string"; CORBA::String_var quoter_Factory_ior = this->orb_manager_.orb()->object_to_string (quoter_Factory_var.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; exception_message = "While activating the POA Manager"; poa_manager->activate (ACE_TRY_ENV); + ACE_TRY_CHECK; // Print the IOR. if (this->debug_level_ >= 2) @@ -160,7 +166,8 @@ Quoter_Server::init_naming_service (CORBA::Environment &ACE_TRY_ENV) CORBA::ORB_ptr orb_ptr = TAO_ORB_Core_instance()->orb(); CORBA::Object_var naming_obj = - orb_ptr->resolve_initial_references ("NameService"); + orb_ptr->resolve_initial_references ("NameService", ACE_TRY_ENV); + ACE_TRY_CHECK; if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -257,10 +264,12 @@ main (int argc, char *argv[]) ACE_TRY_NEW_ENV { - if (quoter_server.init (argc, argv, ACE_TRY_ENV) == -1) - return 1; + int result = quoter_server.init (argc, argv, ACE_TRY_ENV); ACE_TRY_CHECK; + if (result == -1) + return 1; + quoter_server.run (ACE_TRY_ENV); ACE_TRY_CHECK; } diff --git a/TAO/examples/Quoter/testall.pl b/TAO/examples/Quoter/testall.pl deleted file mode 100755 index 5f25258cae3..00000000000 --- a/TAO/examples/Quoter/testall.pl +++ /dev/null @@ -1,206 +0,0 @@ -# $Id$ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# This is a Perl script that runs the client and all the other servers that -# are needed - -$n = 1; -$leave = 0; -$ior = 0; -$done = ""; -$debug = ""; -$other = ""; -$runonce = 0; - -# configuration variables - -$resource = "global"; -$poalock = "thread"; -$poa = "global"; -$concurrency = "reactive"; -$mult = "no"; -$c_resource = "global"; -$c_mult = "no"; - -for ($i = 0; $i <= $#ARGV; $i++) -{ - SWITCH: - { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") - { - print "testall\n"; - print " -resource {global, tss}\n"; - print " -poalock {thread, null}\n"; - print " -poa {global, tss}\n"; - print " -concurrency {reactive, thread-per-connection}\n"; - print " -mult {yes, no}\n"; - print " -c_resource {global, tss}\n"; - print " -c_mult {yes, no}\n"; - exit; - } - if ($ARGV[$i] eq "-resource") - { - $runonce = 1; - $resource = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-poalock") - { - $runonce = 1; - $poalock = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-poa") - { - $runonce = 1; - $poa = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-concurrency") - { - $runonce = 1; - $concurrency = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-mult") - { - $runonce = 1; - $mult = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-c_resource") - { - $runonce = 1; - $c_resource = $ARGV[$i + 1]; - $i++; - } - if ($ARGV[$i] eq "-c_mult") - { - $runonce = 1; - $c_mult = $ARGV[$i + 1]; - $i++; - } - } -} - -if ($runonce > 0) -{ - do_work (); -} -else -{ - pick_resource (); -} - -sub pick_resource -{ - $resource = "global"; - pick_poalock (); - $resource = "tss"; - pick_poalock (); -} - -sub pick_poalock -{ - $poalock = "thread"; - pick_poa (); - $poalock = "null"; - pick_poa (); -} - -sub pick_poa -{ - $poa = "global"; - pick_concurrency (); - - if ($resource ne "global") - { - $poa = "tss"; - pick_concurrency (); - } -} - -sub pick_concurrency -{ - $concurrency = "reactive"; - pick_mult_orbs (); - $concurrency = "thread-per-connection"; - pick_mult_orbs (); -} - -sub pick_mult_orbs -{ - if ($resource ne "global") - { - $mult = "yes"; - pick_c_resource (); - } - $mult = "no"; - pick_c_resource (); -} - -sub pick_c_resource -{ - $c_resource = "global"; - pick_c_mult_orbs (); - $c_resource = "tss"; - pick_c_mult_orbs (); -} - -sub pick_c_mult_orbs -{ - if ($c_resource ne "global") - { - $c_mult = "yes"; - do_work (); - } - $c_mult = "no"; - do_work (); -} - -sub make_s_conf -{ - open (FH, ">s.conf"); - - select (FH); - - print "dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() \"-ORBresources ".$resource." -ORBpoa $poa\"\n"; - print "dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()\n"; - print "dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() \"-ORBconcurrency $concurrency -ORBpoalock ".$poalock." -ORBdemuxstrategy dynamic -ORBtablesize 128\"\n"; - - select (STDOUT); - close (FH); -} - -sub make_c_conf -{ - open (FH, ">c.conf"); - - select (FH); - - print "dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() \"-ORBresources $c_resource\"\n"; - print "dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory()\n"; - print "dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() \"-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128\"\n"; - - select (STDOUT); - close (FH); -} - - -sub do_work -{ - make_s_conf (); - make_c_conf (); - - print "-------------------------------------------\n"; - print "Server: $resource $poalock $poa $concurrency $mult\n"; - print "Client: $c_resource $c_mult\n"; - - if ($mult eq "yes") { $mt = "-sm"; } else { $mt = ""; } - if ($c_mult eq "yes") { $cmt = "-cm"; } else { $cmt = ""; } - - system ("perl run_test.pl $other $mt $cmt -onewin -customconf"); -} - |