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/performance-tests/Latency/AMI | |
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/performance-tests/Latency/AMI')
-rwxr-xr-x | TAO/performance-tests/Latency/AMI/run_test.pl | 76 |
1 files changed, 55 insertions, 21 deletions
diff --git a/TAO/performance-tests/Latency/AMI/run_test.pl b/TAO/performance-tests/Latency/AMI/run_test.pl index cb2bc71a5d3..535ae12c791 100755 --- a/TAO/performance-tests/Latency/AMI/run_test.pl +++ b/TAO/performance-tests/Latency/AMI/run_test.pl @@ -1,48 +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; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$iterations = '150000'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ AMI Latency test\n"; -unlink $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"; -$SV = new PerlACE::Process ("server", - "-o $iorfile"); +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - "-k file://$iorfile -i 150000"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -$SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-i $iterations " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -## Very slow machines need > 3 minutes to finish -$client = $CL->SpawnWaitKill (210); -$server = $SV->WaitKill (10); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +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; +} + +# Very slow machines need > 3 minutes to finish +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 200); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; |