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/tests/Muxing | |
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/tests/Muxing')
-rwxr-xr-x | TAO/tests/Muxing/run_test.pl | 118 |
1 files changed, 86 insertions, 32 deletions
diff --git a/TAO/tests/Muxing/run_test.pl b/TAO/tests/Muxing/run_test.pl index 4dd9dbdc537..9f080e359ff 100755 --- a/TAO/tests/Muxing/run_test.pl +++ b/TAO/tests/Muxing/run_test.pl @@ -6,63 +6,117 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $client1 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; +my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client1_iorfile = $client1->LocalFile ($iorbase); +my $client2_iorfile = $client2->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client1->DeleteFile($iorbase); +$client2->DeleteFile($iorbase); + +my $server_conf = $server->LocalFile ("server$PerlACE::svcconf_ext"); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); +$CL1 = $client1->CreateProcess ("client", "-k file://$client1_iorfile"); +$CL2 = $client2->CreateProcess ("client", "-k file://$client2_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL1 = new PerlACE::Process ("client", " -k file://$iorfile"); -$CL2 = new PerlACE::Process ("client", " -k file://$iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; -} +} +if ($client1->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client1_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client2->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client2_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL1->Spawn (); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$CL1->Spawn (60); -$CL2->Spawn (60); +$client_status = $CL2->Spawn (); -$max_wait = 60; -if ($^O == 'VMS') { - $max_wait = 360; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + $CL1->Kill (); $CL1->TimedWait (1); + exit 1; } -$client1 = $CL1->WaitKill ($max_wait); +$client_status = $CL1->WaitKill ($client1->ProcessStopWaitInterval() + 45); -if ($client1 != 0) { - print STDERR "ERROR: client 1 returned $client1\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$client2 = $CL2->WaitKill ($max_wait); +$client_status = $CL2->WaitKill ($client2->ProcessStopWaitInterval() + 45); -if ($client2 != 0) { - print STDERR "ERROR: client 2 returned $client2\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -# shutdown -$CLx = new PerlACE::Process ("client", " -k file://$iorfile -x"); -$CLx->Spawn (60); -$CLx->WaitKill (15); +$CL1->Arguments ("-k file://$client1_iorfile -x"); + +$client_status = $CL1->SpawnWaitKill ($client1->ProcessStartWaitInterval() + 60); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$server = $SV->WaitKill (15); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client1->DeleteFile($iorbase); +$client2->DeleteFile($iorbase); exit $status; |