summaryrefslogtreecommitdiff
path: root/TAO/tests/BiDirectional
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-18 13:00:45 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-18 13:00:45 +0000
commiteb7fca8b20d0b1fbd1096788568cfb858630f65d (patch)
treeafaf955e01118cd59e07cc10479ed80b8e09d084 /TAO/tests/BiDirectional
parent7f064ce91e9c759204b504b923d021c81f3dc9c7 (diff)
downloadATCD-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/tests/BiDirectional')
-rwxr-xr-xTAO/tests/BiDirectional/run_test_bug3282.pl70
1 files changed, 47 insertions, 23 deletions
diff --git a/TAO/tests/BiDirectional/run_test_bug3282.pl b/TAO/tests/BiDirectional/run_test_bug3282.pl
index 149d8ad0b4d..48099b32afc 100755
--- a/TAO/tests/BiDirectional/run_test_bug3282.pl
+++ b/TAO/tests/BiDirectional/run_test_bug3282.pl
@@ -1,50 +1,74 @@
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;
-$iorbase = "test.ior";
-$iorfile = PerlACE::LocalFile ("$iorbase");
+$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 $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-if (PerlACE::is_vxworks_test()) {
- print STDERR "ERROR: this test cannot be run on VxWorks\n";
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile -i $iterations");
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
exit 1;
}
-else {
- $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost -o $iorfile -i 100");
-}
-$CL = 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";
- $SV->Kill ();
+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());
-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());
-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;