diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-23 09:43:58 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-23 09:43:58 +0000 |
commit | 4b9f19466140e414ad47e5cb3b31dce12a6bc8e9 (patch) | |
tree | fee59540c7a80fe2ffeeb0e9fb8729d2f1814ef0 /TAO/tests/Bug_3000_Regression | |
parent | 44694748d2a7e0dd282e7a0d14f03e19c7bfa065 (diff) | |
download | ATCD-4b9f19466140e414ad47e5cb3b31dce12a6bc8e9.tar.gz |
Mon Nov 23 09:38:57 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/DevGuideExamples/InterfaceRepo/run_test.pl:
* orbsvcs/DevGuideExamples/ImplRepo/Basic/MessengerServer.cpp:
* orbsvcs/DevGuideExamples/ImplRepo/Basic/MessengerClient.cpp:
* orbsvcs/DevGuideExamples/ImplRepo/Basic/run_test.pl:
* orbsvcs/DevGuideExamples/ImplRepo/IORTable/MessengerServer.cpp:
* orbsvcs/DevGuideExamples/ImplRepo/IORTable/run_test.pl:
* orbsvcs/DevGuideExamples/ImplRepo/MessengerClient.cpp:
* orbsvcs/DevGuideExamples/ImplRepo/Activator/run_test.pl:
* orbsvcs/DevGuideExamples/ImplRepo/run_test.pl:
* orbsvcs/tests/Miop/McastHello/run_test.pl:
* orbsvcs/tests/Security/Callback/client.cpp:
* orbsvcs/tests/CosEvent/Timeout/run_test.pl:
* orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/LB_server.cpp:
* orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/LB_server.h:
* orbsvcs/tests/LoadBalancing/GenericFactory/Infrastructure_Controlled/run_test.pl:
* orbsvcs/tests/LoadBalancing/GenericFactory/Application_Controlled/LB_server.cpp:
* orbsvcs/tests/LoadBalancing/GenericFactory/Application_Controlled/LB_server.h:
* orbsvcs/tests/LoadBalancing/GenericFactory/Application_Controlled/run_test.pl:
* orbsvcs/tests/LoadBalancing/LoadMonitor/CPU/run_test.pl:
* performance-tests/Protocols/run_test.pl:
* tests/CollocationLockup/run_test.pl:
* tests/Bug_1495_Regression/Threaded_Client.cpp:
* tests/Bug_1495_Regression/run_test_complex.pl:
* tests/Bug_1495_Regression/run_test.pl:
* tests/Bug_1361_Regression/run_test.pl:
* tests/COIOP/run_test.pl:
* tests/Bug_3000_Regression/run_test.pl:
* tests/Bug_2186_Regression/run_test.pl:
* tests/AlternateIIOP/run_test.pl:
* tests/NestedUpcall/Simple/run_test.pl:
* tests/MT_BiDir/run_test.pl:
* tests/MT_Client/run_test.pl:
* tests/ForwardUponObjectNotExist/run_test.pl:
* tests/No_Server_MT_Connect_Test/run_test.pl:
* tests/Cache_Growth_Test/run_test.pl:
* tests/Bug_1476_Test/run_test.pl:
* bin/tao_other_tests.lst:
* bin/tao_orb_tests.lst:
* examples/Simple/time-date/run_test.pl:
* examples/CSD_Strategy/ThreadPool/run_test.pl:
* examples/CSD_Strategy/ThreadPool3/run_test.pl:
* examples/RTCORBA/Activity/run_test.pl:
* examples/AMH/Sink_Server/run_test.pl:
Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/tests/Bug_3000_Regression')
-rwxr-xr-x | TAO/tests/Bug_3000_Regression/run_test.pl | 111 |
1 files changed, 80 insertions, 31 deletions
diff --git a/TAO/tests/Bug_3000_Regression/run_test.pl b/TAO/tests/Bug_3000_Regression/run_test.pl index b697318dab8..86663fe1462 100755 --- a/TAO/tests/Bug_3000_Regression/run_test.pl +++ b/TAO/tests/Bug_3000_Regression/run_test.pl @@ -6,30 +6,57 @@ 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; - -my $cl_port = PerlACE::random_port(); -my $cl_opts = " -k file://$iorfile -ORBDottedDecimalAddresses 1 " . - "-ORBEndpoint iiop://:$cl_port"; +$debug_level = '0'; # By default use RW wait startegy my $sr_svc_opt = "-ORBSvcConf rw.conf"; -if ($ARGV[0] eq 'default') { - $sr_svc_opt = ""; -} -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 $sr_svc_opt"); -} -$CL = new PerlACE::Process ("client", $cl_opts); -$CL2 = new PerlACE::Process ("client", " -s $cl_opts"); + +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 $iorfile = "test.ior"; + +#Files which used by server +my $server_iorfile = $server->LocalFile ($iorfile); +$server->DeleteFile($iorfile); + +#Files which used by client1 +my $client1_iorfile = $client1->LocalFile ($iorfile); +$client1->DeleteFile($iorfile); + +#Files which used by client2 +my $client2_iorfile = $client2->LocalFile ($iorfile); +$client2->DeleteFile($iorfile); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "$sr_svc_opt " . + "-o $server_iorfile"); + +$port1 = $client1->RandomPort (); + +$CL1 = $client1->CreateProcess ("client", + "-k file://$client1_iorfile " . + "-ORBDottedDecimalAddresses 1 " . + "-ORBEndpoint iiop://:$port1"); + +$port2 = $client2->RandomPort (); + +$CL2 = $client2->CreateProcess ("client", + "-s " . + "-k file://$client2_iorfile " . + "-ORBDottedDecimalAddresses 2 " . + "-ORBEndpoint iiop://:$port2"); print $SV->CommandLine() . "\n"; @@ -40,40 +67,62 @@ if ($server_status != 0) { exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->WaitForFileTimed ($iorfile, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -print $CL->CommandLine() . "\n"; -$client = $CL->SpawnWaitKill (60); +if ($server->GetFile ($iorfile) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($client1->PutFile ($iorfile) == -1) { + print STDERR "ERROR: cannot set file <$client1_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($client2->PutFile ($iorfile) == -1) { + print STDERR "ERROR: cannot set file <$client2_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +print $CL1->CommandLine() . "\n"; + +$client_status = $CL1->SpawnWaitKill ($client1->ProcessStartWaitInterval() + 45); # The client crashes, therefore it normally exists with status != 0, # but a status of -1 would be a serious error. -if ($client == -1) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status == -1) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } print $CL2->CommandLine() . "\n"; -$client2 = $CL2->SpawnWaitKill (60); + +$client_status = $CL2->SpawnWaitKill ($client2->ProcessStartWaitInterval() + 45); # The client crashes, therefore it normally exists with status != 0, # but a status of -1 would be a serious error. -if ($client2 == -1) { - print STDERR "ERROR: client2 returned $client2\n"; +if ($client_status == -1) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (5); +$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($iorfile); +$client1->DeleteFile($iorfile); +$client2->DeleteFile($iorfile); exit $status; |