summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/EC_Custom_Marshal
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-07 10:01:33 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-07 10:01:33 +0000
commit065877f34c820b637e0dca3a7789cbc3b2d9598c (patch)
tree6338e51b292767a5a7867cb0e11e966ac3925317 /TAO/orbsvcs/tests/EC_Custom_Marshal
parent83501a40406107fe81373cac12fc8fec79f94bc9 (diff)
downloadATCD-065877f34c820b637e0dca3a7789cbc3b2d9598c.tar.gz
Mon Dec 7 09:59:08 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/EC_Custom_Marshal/run_test.pl: * orbsvcs/tests/COIOP_Naming_Test/run_test.pl: * orbsvcs/tests/Notify/Timeout/run_test.pl: * orbsvcs/tests/Notify/MT_Dispatching/run_test.pl: * orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl: * orbsvcs/tests/Notify/Reconnecting/run_test.pl: * orbsvcs/tests/Notify/Basic/run_test.pl: * orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp: * orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp: * orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl: * orbsvcs/tests/Notify/MC/Structured_Consumer.cpp: * orbsvcs/tests/Notify/MC/test_monitor.cpp: * orbsvcs/tests/Notify/MC/Structured_Supplier.cpp: * orbsvcs/tests/Notify/MC/run_test.pl: * orbsvcs/tests/ImplRepo/Bug_689_Regression/run_test.pl: * orbsvcs/tests/ImplRepo/scale/run_test.pl: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/MessengerServer.cpp: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/MessengerClient.cpp: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/run_test.pl: * orbsvcs/tests/ImplRepo/NameService/run_test.pl: * orbsvcs/tests/ImplRepo/locked/run_test.pl: * orbsvcs/tests/ImplRepo/ReconnectServer/run_test.pl: * orbsvcs/tests/ImplRepo/run_test.pl: * orbsvcs/tests/Bug_3598b_Regression/run_test.pl: * tests/Muxing/run_test.pl: * tests/ORB_init/Portspan/run_test.pl: * tests/Bug_2183_Regression/run_test.pl: * tests/Bug_3108_Regression/run_test.pl: * bin/tao_other_tests.lst: * bin/tao_orb_tests.lst: * utils/nslist/run_test.pl: * examples/Quoter/run_test.pl: * examples/Callback_Quoter/run_test.pl: * examples/Persistent_Grid/run_test.pl: Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Custom_Marshal')
-rwxr-xr-xTAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl144
1 files changed, 110 insertions, 34 deletions
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
index f1c1f6cee93..1337d5b8996 100755
--- a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
@@ -6,69 +6,145 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$port = PerlACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0
-
-$NS_ior = PerlACE::LocalFile ("NameService.ior");
-$sleeptime = 8;
$status = 0;
+$sleeptime = 8;
+
+my $server1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $server2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+my $server3 = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+my $client = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
+
+$port = $server1->RandomPort () + 10001; # This can't be 10000 on Chorus 4.0
+
+$naming_ior = "NameService.ior";
+
+$server1_naming_ior = $server1->LocalFile ($naming_ior);
+$server2_naming_ior = $server2->LocalFile ($naming_ior);
+$server3_naming_ior = $server3->LocalFile ($naming_ior);
+$client_naming_ior = $client->LocalFile ($naming_ior);
+
+$server1->DeleteFile ($naming_ior);
+$server2->DeleteFile ($naming_ior);
+$server3->DeleteFile ($naming_ior);
+$client->DeleteFile ($naming_ior);
+
-$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service",
- "-ORBNameServicePort $port -o $NS_ior");
-$ES = new PerlACE::Process ("../../Event_Service/Event_Service",
- "-ORBInitRef NameService=file://$NS_ior");
-$C = new PerlACE::Process ("ECM_Consumer",
- "-ORBInitRef NameService=file://$NS_ior");
-$S = new PerlACE::Process ("ECM_Supplier",
- "-ORBInitRef NameService=file://$NS_ior");
+$SV1 = $server1->CreateProcess ("../../Naming_Service/Naming_Service",
+ "-ORBNameServicePort $port " .
+ "-o $server1_naming_ior");
-$NS->Spawn ();
+$SV2 = $server2->CreateProcess ("../../Event_Service/Event_Service",
+ "-ORBInitRef NameService=file://$server2_naming_ior");
-if (PerlACE::waitforfile_timed ($NS_ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for naming service IOR file\n";
- $NS->Kill ();
+$SV3 = $server3->CreateProcess ("ECM_Supplier",
+ "-ORBInitRef NameService=file://$server3_naming_ior");
+
+$CL = $client->CreateProcess ("ECM_Consumer",
+ "-ORBInitRef NameService=file://$client_naming_ior");
+
+$server_status = $SV1->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+}
+if ($server1->WaitForFileTimed ($naming_ior,
+ $server1->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server1_naming_ior>\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
exit 1;
}
-$ES->Spawn ();
+if ($server1->GetFile ($naming_ior) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server1_naming_ior>\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+}
+
+if ($server2->PutFile ($naming_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$server2_naming_ior>\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+}
+if ($server3->PutFile ($naming_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$server3_naming_ior>\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+}
+
+if ($client->PutFile ($naming_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$client_naming_ior>\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ exit 1;
+}
+
+$server_status = $SV2->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ $SV2->Kill (); $SV2->TimedWait (1);
+ exit 1;
+}
sleep $sleeptime;
-$C->Spawn ();
+$client_status = $CL->Spawn ();
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ $SV2->Kill (); $SV2->TimedWait (1);
+ $CL->Kill (); $CL->TimedWait (1);
+ exit 1;
+}
sleep $sleeptime;
-$S->Spawn ();
+$server_status = $SV3->Spawn ();
-$consumer = $C->WaitKill (60);
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $SV1->Kill (); $SV1->TimedWait (1);
+ $SV2->Kill (); $SV2->TimedWait (1);
+ $SV3->Kill (); $SV3->TimedWait (1);
+ $CL->Kill (); $CL->TimedWait (1);
+ exit 1;
+}
-if ($consumer != 0) {
- print STDERR "ERROR: consumer returned $consumer\n";
+$client_status = $CL->WaitKill ($client->ProcessStopWaitInterval() + 45);
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
-$supplier = $S->WaitKill (60);
-
-if ($supplier == -1) {
- print STDERR "ERROR: supplier returned $supplier\n";
+$server_status = $SV3->WaitKill ($server3->ProcessStopWaitInterval() + 45);
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-$nserver = $NS->TerminateWaitKill (5);
+$server_status = $SV2->TerminateWaitKill ($server2->ProcessStopWaitInterval());
-if ($nserver != 0) {
- print STDERR "ERROR: nameserver returned $nserver\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-$eserver = $ES->TerminateWaitKill (5);
-if ($eserver != 0) {
- print STDERR "ERROR: eventserver returned $eserver\n";
+$server_status = $SV1->TerminateWaitKill ($server1->ProcessStopWaitInterval());
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-unlink $NS_ior;
+$server1->DeleteFile ($naming_ior);
+$server2->DeleteFile ($naming_ior);
+$server3->DeleteFile ($naming_ior);
+$client->DeleteFile ($naming_ior);
exit $status;