diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-18 13:00:45 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-18 13:00:45 +0000 |
commit | eb7fca8b20d0b1fbd1096788568cfb858630f65d (patch) | |
tree | afaf955e01118cd59e07cc10479ed80b8e09d084 /TAO/orbsvcs/tests/HTIOP/BiDirectional | |
parent | 7f064ce91e9c759204b504b923d021c81f3dc9c7 (diff) | |
download | ATCD-eb7fca8b20d0b1fbd1096788568cfb858630f65d.tar.gz |
Wed Nov 18 12:58:16 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl:
* orbsvcs/tests/Bug_2925_Regression/run_test.pl:
* orbsvcs/tests/Security/Secure_Invocation/run_test.pl:
* orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp:
* orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp:
* orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl:
* orbsvcs/tests/Security/BiDirectional/run_test.pl:
* orbsvcs/tests/Security/Big_Request/run_test.pl:
* orbsvcs/tests/HTIOP/BiDirectional/run_test.pl:
* orbsvcs/tests/Property/run_test.pl:
* orbsvcs/tests/Bug_2316_Regression/client.cpp:
* orbsvcs/tests/Bug_2316_Regression/server.cpp:
* orbsvcs/tests/Bug_2316_Regression/run_test.pl:
* orbsvcs/tests/Bug_2615_Regression/client.cpp:
* orbsvcs/tests/Bug_2615_Regression/server.cpp:
* orbsvcs/tests/Bug_2615_Regression/run_test.pl:
* orbsvcs/tests/Bug_3216_Regression/run_test.pl:
* orbsvcs/tests/Bug_2709_Regression/client.cpp:
* orbsvcs/tests/Bug_2709_Regression/server.cpp:
* orbsvcs/tests/Bug_2709_Regression/run_test.pl:
* orbsvcs/tests/IOR_MCast/run_test_ipv6.pl:
* orbsvcs/tests/Bug_3215_Regression/run_test.pl:
* orbsvcs/tests/Bug_2287_Regression/run_test.pl:
* DevGuideExamples/SmartProxies/MessengerServer.cpp:
* DevGuideExamples/SmartProxies/LoggerServer.cpp:
* DevGuideExamples/SmartProxies/MessengerClient.cpp:
* DevGuideExamples/SmartProxies/run_test.pl:
* performance-tests/Latency/DSI/run_test.pl:
* performance-tests/Latency/Deferred/run_test.pl:
* performance-tests/Latency/DII/run_test.pl:
* performance-tests/Latency/AMI/run_test.pl:
* performance-tests/Throughput/run_test.pl:
* tests/AMI_Buffering/run_message_count.pl:
* tests/Bug_1495_Regression/run_test_complex.pl:
* tests/Bug_1495_Regression/run_test.pl:
* tests/Crashed_Callback/run_test.pl:
* tests/BiDirectional/run_test_bug3282.pl:
* tests/Bug_1020_Basic_Regression/run_test.pl:
* tests/CallbackTest/run_test_ipv6.pl:
* tests/CallbackTest/run_test_mixed_ip.pl:
* tests/Bug_2289_Regression/run_test.pl:
* tests/DIOP/run_test_ipv6.pl:
* tests/DIOP/run_test.pl:
* tests/NestedUpcall/Triangle_Test/run_test.pl:
* tests/MT_Timeout/run_test.pl:
* tests/Single_Read/server.cpp:
* tests/Single_Read/test_i.cpp:
* tests/Single_Read/run_test.pl:
* tests/Single_Read/test_i.h:
* examples/Logging/run_test.pl:
* examples/Simple/time-date/run_test.pl:
* examples/PluggableUDP/tests/Performance/run_test_ipv6.pl:
* examples/PluggableUDP/tests/Performance/run_test.pl:
Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/orbsvcs/tests/HTIOP/BiDirectional')
-rwxr-xr-x | TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl | 82 |
1 files changed, 62 insertions, 20 deletions
diff --git a/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl b/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl index c3affd14385..b423cdeb10e 100755 --- a/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl +++ b/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl @@ -1,45 +1,87 @@ 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 Sys::Hostname; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); -$host = hostname(); +$debug_level = '0'; +$iterations = '100'; -unlink $iorfile; +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 = "test.ior"; +my $outside = "outside.conf"; +my $inside = "inside.conf"; + +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$SV = new PerlACE::Process ("server", "-orbendpoint htiop://$host: -orbsvcconf outside.conf -o $iorfile -i 100"); -$CL = new PerlACE::Process ("client", "-orbsvcconf inside.conf -k file://$iorfile"); +$hostname = $server->HostName(); -$SV->Spawn (); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndPoint htiop://$hostname: " . + "-ORBSvcConf $outside " . + "-i $iterations " . + "-o $server_iorfile"); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +$CL = $client->CreateProcess ("client", + "-ORBSvcConf $inside " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +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; } -$client = $CL->SpawnWaitKill (20); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 10); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (20); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10); -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); +$client->DeleteFile($iorbase); exit $status; |