diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-14 10:22:04 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-14 10:22:04 +0000 |
commit | d6624af87891a710c777eae4b00ecdccc934b1d1 (patch) | |
tree | 914b68f2902ed9bfd950d46708805b216a83a26b | |
parent | 313a64bc97741d3f4cba767da493c27bd3a9d1e2 (diff) | |
download | ATCD-d6624af87891a710c777eae4b00ecdccc934b1d1.tar.gz |
Wed Feb 14 10:06:58 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/orbsvcs/tests/Bug_2800_Regression/client.cpp | 19 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl | 5 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl | 8 |
3 files changed, 19 insertions, 13 deletions
diff --git a/TAO/orbsvcs/tests/Bug_2800_Regression/client.cpp b/TAO/orbsvcs/tests/Bug_2800_Regression/client.cpp index 0542a897241..2fed9a6d119 100644 --- a/TAO/orbsvcs/tests/Bug_2800_Regression/client.cpp +++ b/TAO/orbsvcs/tests/Bug_2800_Regression/client.cpp @@ -7,17 +7,20 @@ ACE_RCSID(Hello, client, "$Id$") const char *ior = "file://shutdown.ior"; +bool shutdown_nsmain = false; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "k:"); + ACE_Get_Opt get_opts (argc, argv, "k"); int c; while ((c = get_opts ()) != -1) switch (c) { - case '?': + case 'k': + shutdown_nsmain = true; + break; default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " @@ -86,12 +89,16 @@ main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "Catched correct exception\n")); } - CORBA::Object_var shutdowntmp = orb->string_to_object(ior); + if (shutdown_nsmain) + { + CORBA::Object_var shutdowntmp = orb->string_to_object(ior); - Test::NsShutdown_var shutdown = Test::NsShutdown::_narrow(shutdowntmp.in ()); + Test::NsShutdown_var shutdown = + Test::NsShutdown::_narrow(shutdowntmp.in ()); - ACE_DEBUG ((LM_DEBUG, "Shutdown nsmain\n")); - shutdown->shutdown (); + ACE_DEBUG ((LM_DEBUG, "Shutdown nsmain\n")); + shutdown->shutdown (); + } orb->destroy (); } diff --git a/TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl index 2ee459f967a..24365ae6d84 100755 --- a/TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl @@ -18,10 +18,12 @@ foreach $i (@ARGV) { } $iorfile = PerlACE::LocalFile ("ns.ior"); +$shutdownior = PerlACE::LocalFile ("shutdown.ior"); unlink $iorfile; +unlink $shutdownior; $SV = new PerlACE::Process ("nsmain", "-s -ORBDebuglevel $debug_level"); -$CL = new PerlACE::Process ("client", ""); +$CL = new PerlACE::Process ("client", "-k"); $server = $SV->Spawn (); @@ -52,5 +54,6 @@ if ($server != 0) { } unlink $iorfile; +unlink $shutdownior; exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl b/TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl index 8d73ffb4ae7..a5d023c0527 100755 --- a/TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl +++ b/TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl @@ -94,7 +94,7 @@ print STDERR "Killing second naming server\n"; $NS2->Kill (); print STDERR "Starting client\n"; -$client = $CL->Spawn (10); +$client = $CL->Spawn (); if ($client != 0) { print STDERR "ERROR: client returned $client\n"; @@ -103,11 +103,7 @@ if ($client != 0) { sleep (15); -print STDERR "Starting NS2 again\n"; - -$NS2->Spawn (); - -$server = $SV->WaitKill (10); +$server = $SV->TerminateWaitKill (10); if ($server != 0) { print STDERR "ERROR: server returned $server\n"; |