summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Log/RTEvent
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-25 09:05:43 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-25 09:05:43 +0000
commit3bc10cba54f913265a010c2955a4f350292ec38e (patch)
treedd8eba54b56000bcd480b2b09d154401d69898b6 /TAO/orbsvcs/examples/Log/RTEvent
parente8373a990d20b12116b0130a2fc29c984ce568e7 (diff)
downloadATCD-3bc10cba54f913265a010c2955a4f350292ec38e.tar.gz
Wed Nov 25 09:01:20 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/DevGuideExamples/ValueTypes/Notify/supplier.cpp: * orbsvcs/DevGuideExamples/ValueTypes/Notify/consumer.cpp: * orbsvcs/DevGuideExamples/ValueTypes/Notify/run_test.pl: * orbsvcs/DevGuideExamples/Security/PolicyControllingApp/MessengerServer.cpp: * orbsvcs/DevGuideExamples/Security/PolicyControllingApp/MessengerClient.cpp: * orbsvcs/DevGuideExamples/Security/PolicyControllingApp/run_test.pl: * orbsvcs/DevGuideExamples/Security/SecurityUnawareApp/MessengerServer.cpp: * orbsvcs/DevGuideExamples/Security/SecurityUnawareApp/MessengerClient.cpp: * orbsvcs/DevGuideExamples/Security/SecurityUnawareApp/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/QoSProperties/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/QoSProperties/MessengerClient.cpp: * orbsvcs/DevGuideExamples/NotifyService/QoSProperties/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/Filtering/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/Messenger/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/Messenger/MessengerClient.cpp: * orbsvcs/DevGuideExamples/NotifyService/Messenger/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/SupplierSideNC/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/SupplierSideNC/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/EventSequence/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/EventSequence/MessengerClient.cpp: * orbsvcs/DevGuideExamples/NotifyService/EventSequence/run_test.pl: * orbsvcs/DevGuideExamples/NotifyService/RTNotify/MessengerConsumer.cpp: * orbsvcs/DevGuideExamples/NotifyService/RTNotify/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NotifyService/RTNotify/MessengerClient.cpp: * orbsvcs/DevGuideExamples/NotifyService/RTNotify/run_test.pl: * orbsvcs/DevGuideExamples/NamingService/corbaname_Messenger/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NamingService/corbaname_Messenger/run_test.pl: * orbsvcs/DevGuideExamples/NamingService/Naming_Client/run_test.pl: * orbsvcs/DevGuideExamples/NamingService/Messenger/run_test.pl: * orbsvcs/DevGuideExamples/NamingService/corbaloc_Messenger/run_test.pl: * orbsvcs/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerServer.cpp: * orbsvcs/DevGuideExamples/NamingService/Naming_Context_Ext/MessengerClient.cpp: * orbsvcs/DevGuideExamples/NamingService/Naming_Context_Ext/run_test.pl: * orbsvcs/DevGuideExamples/PortableInterceptors/PICurrent_NameService/run_test.pl: * orbsvcs/tests/Notify/Bug_3646c_Regression/server.cpp: * orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl: * orbsvcs/tests/InterfaceRepo/Bug_3200_Regression/run_test.pl: * orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl: * orbsvcs/tests/InterfaceRepo/Bug_3495_Regression/run_test.pl: * orbsvcs/tests/InterfaceRepo/Application_Test/ifr_dii_client.cpp: * orbsvcs/tests/InterfaceRepo/Application_Test/server.cpp: * orbsvcs/tests/InterfaceRepo/Application_Test/ifr_dii_client.h: * orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl: * orbsvcs/examples/Log/Basic/run_test.pl: * orbsvcs/examples/Log/Event/run_test.pl: * orbsvcs/examples/Log/RTEvent/run_test.pl: * orbsvcs/examples/Log/Notify/run_test.pl: * orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp: * orbsvcs/examples/CosEC/TypedSimple/run_test.pl: * orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/run_test2.pl: * orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/run_test.pl: * orbsvcs/examples/LoadBalancing/run_test.pl: * performance-tests/Sequence_Latency/DSI/run_test.pl: * performance-tests/Sequence_Latency/Deferred/run_test.pl: * performance-tests/Sequence_Latency/Thread_Pool/run_test.pl: * performance-tests/Sequence_Latency/Single_Threaded/default_configuration.pl: * performance-tests/Sequence_Latency/Single_Threaded/run_test.pl: * performance-tests/Sequence_Latency/DII/run_test.pl: * performance-tests/Sequence_Latency/AMH_Single_Threaded/run_test.pl: * performance-tests/Sequence_Latency/AMI/run_test.pl: * performance-tests/Sequence_Latency/Thread_Per_Connection/run_test.pl: * performance-tests/RTCorba/Oneways/Reliable/client_test.pl: * performance-tests/RTCorba/Oneways/Reliable/server.cpp: * performance-tests/RTCorba/Oneways/Reliable/run_test.pl: * performance-tests/Latency/Thread_Pool/run_test.pl: * performance-tests/Latency/Single_Threaded/default_configuration.pl: * performance-tests/Latency/Single_Threaded/run_test.pl: * performance-tests/Latency/Thread_Per_Connection/run_test.pl: * tests/GIOP_Fragments/Java_Big_Request/run_test.pl: * tests/GIOP_Fragments/Java_Big_Reply/run_test.pl: * examples/CSD_Strategy/ThreadPool2/run_test.pl: * examples/CSD_Strategy/ThreadPool4/run_test.pl: * examples/CSD_Strategy/ThreadPool5/run_test.pl: * examples/CSD_Strategy/ThreadPool6/run_test.pl: Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/orbsvcs/examples/Log/RTEvent')
-rwxr-xr-xTAO/orbsvcs/examples/Log/RTEvent/run_test.pl134
1 files changed, 108 insertions, 26 deletions
diff --git a/TAO/orbsvcs/examples/Log/RTEvent/run_test.pl b/TAO/orbsvcs/examples/Log/RTEvent/run_test.pl
index 16ce7e6c81a..10e1252164c 100755
--- a/TAO/orbsvcs/examples/Log/RTEvent/run_test.pl
+++ b/TAO/orbsvcs/examples/Log/RTEvent/run_test.pl
@@ -6,33 +6,87 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
+$debug_level = '0';
-$nsior = PerlACE::LocalFile ("ns.ior");
-
-unlink $nsior;
-
-$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
-$LS = new PerlACE::Process ("../../../Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service", "-ORBInitRef NameService=file://$nsior");
-$consumer = new PerlACE::Process ("RTEvent_Consumer", "-ORBInitRef NameService=file://$nsior");
-$supplier = new PerlACE::Process ("RTEvent_Supplier", "-ORBInitRef NameService=file://$nsior");
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+my $ns = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $ls = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+my $con = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+my $sup = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
+
+$nsiorfile = "ns.ior";
+
+my $ns_nsiorfile = $ns->LocalFile ($nsiorfile);
+my $ls_nsiorfile = $ls->LocalFile ($nsiorfile);
+my $con_nsiorfile = $con->LocalFile ($nsiorfile);
+my $sup_nsiorfile = $sup->LocalFile ($nsiorfile);
+$ns->DeleteFile ($nsiorfile);
+$ls->DeleteFile ($nsiorfile);
+$con->DeleteFile ($nsiorfile);
+$sup->DeleteFile ($nsiorfile);
+
+$NS = $ns->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/Naming_Service/Naming_Service",
+ " -o $ns_nsiorfile");
+$LS = $ls->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/Logging_Service/RTEvent_Logging_Service/RTEvent_Logging_Service",
+ " -ORBInitRef NameService=file://$ls_nsiorfile");
+$CON = $con->CreateProcess ("RTEvent_Consumer",
+ "-ORBInitRef NameService=file://$con_nsiorfile");
+$SUP = $sup->CreateProcess ("RTEvent_Supplier",
+ "-ORBInitRef NameService=file://$sup_nsiorfile");
print STDERR "Starting Naming Service\n";
+$NS_status = $NS->Spawn ();
+
+if ($NS_status != 0) {
+ print STDERR "ERROR: Name Service returned $NS_status\n";
+ exit 1;
+}
-$NS->Spawn ();
+if ($ns->WaitForFileTimed ($nsiorfile,$ns->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$ns_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
-if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill ();
- exit 1;
+if ($ns->GetFile ($nsiorfile) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$ns_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+if ($ls->PutFile ($nsiorfile) == -1) {
+ print STDERR "ERROR: cannot set file <$ls_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+if ($con->PutFile ($nsiorfile) == -1) {
+ print STDERR "ERROR: cannot set file <$con_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+if ($sup->PutFile ($nsiorfile) == -1) {
+ print STDERR "ERROR: cannot set file <$sup_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
}
print STDERR "Starting Logging Service\n";
-$LS->Spawn ();
+$LS_status = $LS->Spawn ();
+
+if ($LS_status != 0) {
+ print STDERR "ERROR: Logging Service returned $LS_status\n";
+ $LS->Kill (); $LS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
# Give time for logging service to initialize and install its object
# reference in the naming service.
@@ -40,28 +94,56 @@ sleep (5);
print STDERR "Starting Consumer\n";
-$consumer->Spawn ();
+$CON_status = $CON->Spawn ();
+if ($CON_status != 0) {
+ print STDERR "ERROR: RTEvent Consumer returned $CON_status\n";
+ $CON->Kill (); $CON->TimedWait (1);
+ $LS->Kill (); $LS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
sleep (1);
print STDERR "Starting Supplier\n";
-$supplier->Spawn ();
+$SUP_status = $SUP->Spawn ();
+if ($SUP_status != 0) {
+ print STDERR "ERROR: RTEvent Supplier returned $SUP_status\n";
+ $status = 1;
+}
+$SUP_status = $SUP->WaitKill ($sup->ProcessStopWaitInterval());
+if ($SUP_status != 0) {
+ print STDERR "ERROR: RTEvent Supplier returned $SUP_status\n";
+ $status = 1;
+}
-$supplier->WaitKill (10);
+$CON_status = $CON->TerminateWaitKill ($con->ProcessStopWaitInterval());
-$consumer->Kill ();
+if ($CON_status != 0) {
+ print STDERR "ERROR: RTEvent Consumer returned $CON_status\n";
+ $status = 1;
+}
-$NS->Kill ();
+$LS_status = $LS->TerminateWaitKill ($ls->ProcessStopWaitInterval());
-$LS->Kill ();
+if ($LS_status != 0) {
+ print STDERR "ERROR: Logging Service returned $LS_status\n";
+ $status = 1;
+}
+
+$NS_status = $NS->TerminateWaitKill ($ns->ProcessStopWaitInterval());
+
+if ($NS_status != 0) {
+ print STDERR "ERROR: Name Service returned $NS_status\n";
+ $status = 1;
+}
-#if ($client != 0) {
-# print STDERR "ERROR: client returned $client\n";
-# $status = 1;
-#}
-unlink $nsior;
+$ns->DeleteFile ($nsiorfile);
+$ls->DeleteFile ($nsiorfile);
+$con->DeleteFile ($nsiorfile);
+$sup->DeleteFile ($nsiorfile);
exit $status;