diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-01 09:50:38 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-01 09:50:38 +0000 |
commit | 3ea77dfd63b78dc248e5b59c9617f6a6861a6b8a (patch) | |
tree | 680b2345c6f6895025861383a0447875a48cd2e5 /TAO/orbsvcs/tests/EC_Multiple | |
parent | 649ca8a04517c721c008b891e327cca28cf90470 (diff) | |
download | ATCD-3ea77dfd63b78dc248e5b59c9617f6a6861a6b8a.tar.gz |
Tue Dec 1 09:48:38 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Log/Basic_Log_Test/run_test.pl:
* orbsvcs/tests/Bug_2800_Regression/client.cpp:
* orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl:
* orbsvcs/tests/Bug_2800_Regression/nsmain.cpp:
* orbsvcs/tests/Bug_2800_Regression/run_test.pl:
* orbsvcs/tests/Bug_2777_Regression/run_test.pl:
* orbsvcs/tests/Bug_3673_Regression/client.cpp:
* orbsvcs/tests/Bug_3673_Regression/nsmain.cpp:
* orbsvcs/tests/Bug_3673_Regression/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops_RTCORBA/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated_RTCORBA/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/2_Hops/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Colocated/run_test.pl:
* orbsvcs/tests/EC_Multiple/run_test.pl:
* orbsvcs/tests/Interoperable_Naming/run_test.pl:
* orbsvcs/tests/LoadBalancing/GenericFactory/Manage_Object_Group/run_test.pl:
* orbsvcs/examples/ORT/run_test.pl:
* orbsvcs/examples/Notify/Subscribe/run_test.pl:
* orbsvcs/examples/Notify/ThreadPool/run_test.pl:
* orbsvcs/examples/Notify/Lanes/run_test.pl:
* orbsvcs/examples/Notify/Filter/run_test.pl:
* orbsvcs/examples/RtEC/IIOPGateway/consumerec_crash.pl:
* orbsvcs/examples/RtEC/IIOPGateway/run_test.pl:
* orbsvcs/examples/RtEC/Simple/run_test.pl:
* performance-tests/POA/Create_Reference/run_test.pl:
* tests/Faults/run_test_pp.pl:
* tests/Faults/run_test.pl:
* tests/Muxing/run_test.pl:
* tests/Bug_1020_Regression/run_test.pl:
* tests/Bug_1551_Regression/run_test.pl:
* tests/Bug_2678_Regression/run_test.pl:
* tests/MT_Server/run_test.pl:
* tests/LongUpcalls/run_test.pl:
* tests/Bug_2084_Regression/run_test.pl:
* tests/Bug_1482_Regression/run_test.pl:
* tests/Bug_3547_Regression/run_test.pl:
* tests/Bug_2174_Regression/run_test.pl:
* tests/POA/TIE/server.cpp:
* tests/POA/TIE/run_test.pl:
* tests/MT_BiDir/run_test.pl:
* tests/Monitor/Marshal_Buffer/run_test.pl:
* tests/Bug_1869_Regression/client.cpp:
* tests/Bug_1869_Regression/run_test.pl:
* tests/Nested_Upcall_Crash/run_test.pl:
* tests/ORB_Local_Config/run_tests_all.pl:
* tests/Bug_1269_Regression/run_test.pl:
* tests/Forwarding/run_test.pl:
* bin/tao_orb_tests.lst:
Test are converted to use new test framework
and added to fuzz build.
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Multiple')
-rwxr-xr-x | TAO/orbsvcs/tests/EC_Multiple/run_test.pl | 71 |
1 files changed, 53 insertions, 18 deletions
diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl b/TAO/orbsvcs/tests/EC_Multiple/run_test.pl index 55b5f26405e..5db73ceb7a6 100755 --- a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl +++ b/TAO/orbsvcs/tests/EC_Multiple/run_test.pl @@ -1,44 +1,79 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$NS_ior = PerlACE::LocalFile ("NameService.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; + +my $iorbase = "NameService.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $NS_ior"); -$T = new PerlACE::Process ("EC_Multiple", - "-ORBInitRef NameService=file://$NS_ior" - ." -s local"); +$SV = $server->CreateProcess ("../../Naming_Service/Naming_Service", + "-ORBdebuglevel $debug_level -o $server_iorfile"); + +$CL = $client->CreateProcess ("EC_Multiple", + "-ORBInitRef NameService=file://$client_iorfile " . + "-s local"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} +if ($server->WaitForFileTimed ($iorbase, -$NS->Spawn (); + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -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 (); +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } # This is a very simple test, no multiple consumers and no gateways. -$test = $T->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -if ($test != 0) { - print STDERR "ERROR: test returned $test\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$nserver = $NS->TerminateWaitKill (5); +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); -if ($nserver != 0) { - print STDERR "ERROR: naming service returned $nserver\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; |