From f027f405efad9fa9f3d72542e6f8b6fb535efb0a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 9 Jan 2008 11:55:18 +0000 Subject: Wed Jan 9 11:54:12 UTC 2008 Johnny Willemsen --- TAO/ChangeLog | 8 ++++++++ TAO/tests/Servant_To_Reference_Test/run_test.pl | 16 ++++++++++++++-- TAO/tests/Servant_To_Reference_Test/server.cpp | 17 ++++++++++++----- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 36806e80aba..5ed6664e930 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Wed Jan 9 11:54:12 UTC 2008 Johnny Willemsen + + * tests/Servant_To_Reference_Test/run_test.pl: + * tests/Servant_To_Reference_Test/server.cpp: + When the server has started it writes a dummy ior file, that way + we can correctly handle the slow startup of the vxworks tests. Then + we can use the original timeout of 90 seconds again + Tue Jan 8 21:56:58 UTC 2008 William R. Otte * TAO_IDL/TAO_IDL.mwc: diff --git a/TAO/tests/Servant_To_Reference_Test/run_test.pl b/TAO/tests/Servant_To_Reference_Test/run_test.pl index 91045fa2fcc..b6624bcccbe 100755 --- a/TAO/tests/Servant_To_Reference_Test/run_test.pl +++ b/TAO/tests/Servant_To_Reference_Test/run_test.pl @@ -19,10 +19,22 @@ else { $SV = new PerlACE::Process ("server", "-o $iorfile"); } -$SV->Spawn (); +$server = $SV->Spawn (); + +if ($server != 0) { + print STDERR "ERROR: server returned $server\n"; + exit 1; +} + +if (PerlACE::waitforfile_timed ($iorfile, + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} ## Slower hardware can require much more time to complete. -$server = $SV->WaitKill ($PerlACE::wait_interval_for_process_creation); +$server = $SV->WaitKill (90); if ($server != 0) { print STDERR "ERROR: server returned $server\n"; diff --git a/TAO/tests/Servant_To_Reference_Test/server.cpp b/TAO/tests/Servant_To_Reference_Test/server.cpp index 24e2a5b6110..e0466d22ca1 100644 --- a/TAO/tests/Servant_To_Reference_Test/server.cpp +++ b/TAO/tests/Servant_To_Reference_Test/server.cpp @@ -113,21 +113,20 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) if (parse_args (argc, argv) != 0) return 1; - One_Impl *one_impl; + One_Impl *one_impl = 0; ACE_NEW_RETURN (one_impl, One_Impl (orb.in ()), 1); - Two_Impl *two_impl; + Two_Impl *two_impl = 0; ACE_NEW_RETURN (two_impl, Two_Impl (orb.in ()), 1); - Three_Impl *three_impl; + Three_Impl *three_impl = 0; ACE_NEW_RETURN (three_impl, Three_Impl (orb.in ()), 1); - PortableServer::ServantBase_var owner_transfer1 (one_impl); PortableServer::ServantBase_var owner_transfer2 (two_impl); PortableServer::ServantBase_var owner_transfer3 (three_impl); @@ -139,7 +138,6 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) poa_manager.in (), policies); - PortableServer::ObjectId_var oid1 = first_poa->activate_object (one_impl); @@ -149,6 +147,15 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) PortableServer::ObjectId_var oid3 = first_poa->activate_object (three_impl); + // Output the IOR to the + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for writing IOR: %s\n", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", "started"); + ACE_OS::fclose (output_file); MT_Task task (first_poa.in (), one_impl, -- cgit v1.2.1