diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-13 09:21:51 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-13 09:21:51 +0000 |
commit | 38ba87d6f08c5c43a2e6b9efbd6c890933eb5e1a (patch) | |
tree | 175329f71ad2787bc9ddda008980212ec73acf97 /TAO/tests/RTScheduling | |
parent | 2a4b1c0ce4c45aeca7ac97ae8981d57fc9541ce3 (diff) | |
download | ATCD-38ba87d6f08c5c43a2e6b9efbd6c890933eb5e1a.tar.gz |
Fri Nov 13 09:18:57 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Bug_3486_Regression/run_test.pl:
* orbsvcs/tests/FaultTolerance/IOGRManipulation/run_test.pl:
* orbsvcs/tests/Notify/Bug_3663_Regression/run_test.pl:
* orbsvcs/tests/Notify/Bug_3646d_Regression/run_test.pl:
* orbsvcs/tests/Bug_2137_Regression/run_test.pl:
* DevGuideExamples/LocalObjects/ServantLocator/MessengerServer.cpp:
* DevGuideExamples/LocalObjects/ServantLocator/MessengerClient.cpp:
* DevGuideExamples/LocalObjects/ServantLocator/run_test.pl:
* DevGuideExamples/RTCORBA/MessengerServer.cpp:
* DevGuideExamples/RTCORBA/MessengerClient.cpp:
* DevGuideExamples/RTCORBA/run_test.pl:
* tests/Stack_Recursion/run_test.pl:
* tests/Timed_Buffered_Oneways/run_test.pl:
* tests/Bug_2234_Regression/client.cpp:
* tests/Bug_2234_Regression/server.cpp:
* tests/Bug_2234_Regression/run_test.pl:
* tests/Bug_2768_Regression/server.cpp:
* tests/Bug_2768_Regression/run_test.pl:
* tests/Blocking_Sync_None/run_test.pl:
* tests/Crash_On_Write/run_test.pl:
* tests/Bug_3068_Regression/run_test.pl:
* tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl:
* tests/Bug_2683_Regression/server.cpp:
* tests/Bug_2683_Regression/run_test.pl:
* tests/RTScheduling/Scheduling_Interceptor/run_test.pl:
* tests/File_IO/run_test.pl:
* tests/Bug_1568_Regression/run_test.pl:
* tests/Reliable_Oneways/run_sync_with_transport.pl:
* tests/Reliable_Oneways/run_sync_none.pl:
* tests/Reliable_Oneways/run_sync_with_server.pl:
* tests/Reliable_Oneways/run_sync_with_target.pl:
* bin/tao_other_tests.lst:
* bin/tao_orb_tests.lst:
Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/tests/RTScheduling')
-rwxr-xr-x | TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl | 79 |
1 files changed, 54 insertions, 25 deletions
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl b/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl index 8b28cefd074..237be8be118 100755 --- a/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl +++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/run_test.pl @@ -1,53 +1,82 @@ 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; - -# amount of delay between running the servers +use PerlACE::TestTarget; $status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile("$iorbase"); - -unlink $iorfile; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("Scheduler_Interceptor_Server", "-f $iorbase"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("Scheduler_Interceptor_Server", "-f $iorfile"); -} -$CL = new PerlACE::Process ("Scheduler_Interceptor_Client", "-f $iorfile"); +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 = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("Scheduler_Interceptor_Server", + "-ORBdebuglevel $debug_level " . + "-f $server_iorfile"); + +$CL = $client->CreateProcess ("Scheduler_Interceptor_Client", + "-f $client_iorfile"); + print STDERR "Starting Server\n"; + +$server_status = $SV->Spawn (); -$SV->Spawn (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +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; } print STDERR "Starting Client\n"; -$sender = $CL->SpawnWaitKill (200); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 185); -if ($sender != 0) { - print STDERR "ERROR: sender returned $sender\n"; +if ($client_status != 0) { + print STDERR "ERROR: sender returned $client_status\n"; $status = 1; } -$receiver = $SV->TerminateWaitKill (15); +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval() + 5); -if ($receiver != 0) { - print STDERR "ERROR: receiver returned $receiver\n"; +if ($server_status != 0) { + print STDERR "ERROR: receiver returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; |