summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-01-09 11:55:18 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-01-09 11:55:18 +0000
commitf027f405efad9fa9f3d72542e6f8b6fb535efb0a (patch)
tree72531700e2f8cb894a40542ac93d2fe53a94aa7c
parent5d93cf68930581152488b667695cb9eda6d25d2d (diff)
downloadATCD-f027f405efad9fa9f3d72542e6f8b6fb535efb0a.tar.gz
Wed Jan 9 11:54:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog8
-rwxr-xr-xTAO/tests/Servant_To_Reference_Test/run_test.pl16
-rw-r--r--TAO/tests/Servant_To_Reference_Test/server.cpp17
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 <jwillemsen@remedy.nl>
+
+ * 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 <wotte@dre.vanderbilt.edu>
* 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 <ior_output_file>
+ 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,