summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-21 13:11:52 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-21 13:11:52 +0000
commit69a31a927aa23909279a11c925436d0950aa275d (patch)
tree43e0779a9ef5541886503d30bb601ff0438e67cf
parent837df20db0da4025f885e982100cc837e804353b (diff)
downloadATCD-69a31a927aa23909279a11c925436d0950aa275d.tar.gz
Mon Dec 21 13:09:35 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp: * tests/Oneway_Send_Timeouts/run_test.pl: * tests/Optimized_Connection/run_test.pl: * examples/Simple/time-date/svc.conf: * examples/Simple/time-date/run_test.pl: Tests are converted to use new test framework and added to fuzz build.
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp13
-rwxr-xr-xTAO/examples/Simple/time-date/run_test.pl21
-rw-r--r--TAO/examples/Simple/time-date/svc.conf11
-rwxr-xr-xTAO/tests/Oneway_Send_Timeouts/run_test.pl2
-rwxr-xr-xTAO/tests/Optimized_Connection/run_test.pl5
6 files changed, 47 insertions, 16 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4415d103b96..da25908622f 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Mon Dec 21 13:09:35 UTC 2009 Denis Budko <denis.budko@remedy.nl>
+
+ * DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp:
+ * tests/Oneway_Send_Timeouts/run_test.pl:
+ * tests/Optimized_Connection/run_test.pl:
+ * examples/Simple/time-date/svc.conf:
+ * examples/Simple/time-date/run_test.pl:
+
+ Tests are converted to use new test framework
+ and added to fuzz build.
+
Mon Dec 21 12:39:29 UTC 2009 Vladimir Zykov <vladimir.zykov@prismtech.com>
* bin/tao_orb_tests.lst:
diff --git a/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp b/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp
index 512254aabea..7ae5fe8bb1a 100644
--- a/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp
+++ b/TAO/DevGuideExamples/Multithreading/ThreadPerConnection/MessengerServer.cpp
@@ -59,9 +59,16 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
poa->activate_object( messenger_servant.in() );
CORBA::Object_var messenger_obj = poa->id_to_reference( oid.in() );
CORBA::String_var str = orb->object_to_string( messenger_obj.in() );
- std::ofstream iorFile(ACE_TEXT_ALWAYS_CHAR (ior_output_file));
- iorFile << str.in() << std::endl;
- iorFile.close();
+
+ // 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", str.in ());
+ ACE_OS::fclose (output_file);
std::cout << "IOR written to file " << ACE_TEXT_ALWAYS_CHAR (ior_output_file) << std::endl;
// Accept requests from clients.
diff --git a/TAO/examples/Simple/time-date/run_test.pl b/TAO/examples/Simple/time-date/run_test.pl
index 17b178e651d..62732b50322 100755
--- a/TAO/examples/Simple/time-date/run_test.pl
+++ b/TAO/examples/Simple/time-date/run_test.pl
@@ -27,6 +27,26 @@ my $client_iorfile = $client->LocalFile ($iorbase);
$server->DeleteFile($iorbase);
$client->DeleteFile($iorbase);
+# Generate svc.conf file for server
+my $server_conf = "svc.conf";
+$server->LocalFile ($server_conf);
+
+die "Error: Cannot create svc.conf file" if not open(FH, ">$server_conf");
+print FH "# Define a special Reactor for single-threaded configurations. " .
+ " Refer to README for details. \n";
+print FH "dynamic Resource_Factory Service_Object * Time_Date:_make_My_Resource_Factory()\n";
+print FH "# Dynamically configure the ORB into the application process.\n";
+print FH "dynamic ORB Service_Object * Time_Date:_make_DLL_ORB() \"dummy\"\n";
+print FH "# Once the ORB is configured, dynamically configure the Time_Date service.\n";
+print FH "dynamic Time_Date_Servant Service_Object * Time_Date:_make_Time_Date_Servant() " .
+ "\"dummy -n ORB -o $server_iorfile\"\n";
+close(FH);
+
+if ($server->PutFile ($server_conf) == -1) {
+ print STDERR "ERROR: cannot set file <$server_conf\n";
+ exit 1;
+}
+
$SV = $server->CreateProcess ("server", "");
$CL = $client->CreateProcess ("client", "-f $client_iorfile -x -ORBSvcConf $client_conffile");
$server_status = $SV->Spawn ();
@@ -69,6 +89,7 @@ if ($server_status != 0) {
$status = 1;
}
+$server->DeleteFile ($server_conf);
$server->DeleteFile($iorbase);
$client->DeleteFile($iorbase);
diff --git a/TAO/examples/Simple/time-date/svc.conf b/TAO/examples/Simple/time-date/svc.conf
deleted file mode 100644
index feed2720801..00000000000
--- a/TAO/examples/Simple/time-date/svc.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-# $Id$
-# Define a special Reactor for single-threaded configurations. Refer
-# to README for details.
-dynamic Resource_Factory Service_Object * Time_Date:_make_My_Resource_Factory()
-
-# Dynamically configure the ORB into the application process.
-dynamic ORB Service_Object * Time_Date:_make_DLL_ORB() "dummy"
-
-# Once the ORB is configured, dynamically configure the Time_Date service.
-dynamic Time_Date_Servant Service_Object * Time_Date:_make_Time_Date_Servant() "dummy -n ORB -o ior"
-
diff --git a/TAO/tests/Oneway_Send_Timeouts/run_test.pl b/TAO/tests/Oneway_Send_Timeouts/run_test.pl
index 91aced9b97f..7b3b96e92ba 100755
--- a/TAO/tests/Oneway_Send_Timeouts/run_test.pl
+++ b/TAO/tests/Oneway_Send_Timeouts/run_test.pl
@@ -14,7 +14,7 @@ $status = 0;
$debug_level = '0';
$test_port = 12345;
$management_port = 12346;
-$client_conf = "lf_flush.conf";
+$client_conf = $target->LocalFile ("lf_flush.conf");
$flush_strategy = "LF";
foreach $i (@ARGV) {
diff --git a/TAO/tests/Optimized_Connection/run_test.pl b/TAO/tests/Optimized_Connection/run_test.pl
index 5a856e7adf8..21626e5fb51 100755
--- a/TAO/tests/Optimized_Connection/run_test.pl
+++ b/TAO/tests/Optimized_Connection/run_test.pl
@@ -22,8 +22,11 @@ my $client = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail
my $iorbase = "oc.ior";
my $client_iorfile = $client->LocalFile ($iorbase);
+my $client_conf = $client->LocalFile ("oc_svc.conf");
+
$CL = $client->CreateProcess ("client", "-k file://$client_iorfile ".
- "-orbsvcconf oc_svc.conf");
+ "-orbsvcconf $client_conf");
+
if ($client->WaitForFileTimed ($iorbase,
$client->ProcessStartWaitInterval()) == -1) {