summaryrefslogtreecommitdiff
path: root/TAO/tests/Multiple
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-30 10:03:58 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-30 10:03:58 +0000
commite6cc67104d57669f906094582911e63de87028e5 (patch)
tree1e31bb7fc2ab61eeaf2b980abaefab91a7952292 /TAO/tests/Multiple
parent93f5c2373f105917e4a4c560a1e1dfd7bbbabc0e (diff)
downloadATCD-e6cc67104d57669f906094582911e63de87028e5.tar.gz
Mon Nov 30 10:01:49 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/default_configuration.pl: * orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/run_test.pl: * orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/default_configuration.pl: * orbsvcs/tests/Simple_Naming/run_test.pl: * orbsvcs/tests/Security/InsecureReferences/run_test.pl: * orbsvcs/tests/Security/MT_IIOP_SSL/run_test.pl: * orbsvcs/tests/Security/Bug_1107_Regression/run_test.pl: * orbsvcs/tests/Security/Crash_Test/run_test.pl: * orbsvcs/tests/Security/MT_SSLIOP/run_test_harsh.pl: * orbsvcs/tests/Security/MT_SSLIOP/run_test_heavy.pl: * orbsvcs/tests/Security/MT_SSLIOP/run_test.pl: * orbsvcs/tests/AVStreams/Component_Switching/run_test.pl: * orbsvcs/tests/AVStreams/Full_Profile/run_test.pl: * orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl: * orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/run_test.pl: * orbsvcs/tests/AVStreams/Latency/run_test.pl: * orbsvcs/tests/AVStreams/Asynch_Three_Stage/run_test.pl: * orbsvcs/tests/AVStreams/Pluggable/run_test.pl: * orbsvcs/tests/AVStreams/Simple_Three_Stage/run_test.pl: * orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl: * orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl: * orbsvcs/tests/AVStreams/Multicast/run_test.pl: * orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl: * orbsvcs/tests/AVStreams/Modify_QoS/run_test.pl: * orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl: * orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_all.pl: * orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl: * orbsvcs/tests/Notify/XML_Persistence/run_test.pl: * orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl: * orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl: * orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl: * orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl: * orbsvcs/tests/InterfaceRepo/IFR_Self_Recursive_IDL_Test/run_test.pl: * performance-tests/POA/Implicit_Activation/run_test.pl: * performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl: * performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl: * performance-tests/Callback/run_test.pl: * performance-tests/Latency/AMH_Single_Threaded/run_test.pl: * performance-tests/Cubit/TAO/MT_Cubit/run_test.pl: * performance-tests/Cubit/TAO/DII_Cubit/run_test.pl: * performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl: * tests/Big_Twoways/run_test.pl: * tests/Bug_2918_Regression/run_test.pl: * tests/Strategies/run_test.pl: * tests/Bug_1482_Regression/run_test.pl: * tests/Portable_Interceptors/Benchmark/run_test.pl: * tests/Xt_Stopwatch/run_test.pl: * tests/Multiple/run_test.pl: * tests/CSD_Strategy_Tests/Broken/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl: * tests/Oneway_Timeouts/client.cpp: * tests/Oneway_Timeouts/server.cpp: * tests/Oneway_Timeouts/run_test.pl: * tests/Smart_Proxies/Policy/server.cpp: * tests/Smart_Proxies/Policy/run_test.pl: * tests/Bug_1270_Regression/run_test.pl: * tests/Parallel_Connect_Strategy/run_test.pl: * tests/Muxed_GIOP_Versions/run_test.pl: * tests/Connect_Strategy_Test/run_test.pl: * tests/Big_Oneways/run_test.pl: * tests/Bug_1627_Regression/server.cpp: * tests/Bug_1627_Regression/run_test.pl: * tests/InterOp-Naming/run_test.pl: * tests/Nested_Upcall_Crash/run_test.pl: * tests/Bug_1269_Regression/client.cpp: * tests/Bug_1269_Regression/run_test.pl: Test are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/tests/Multiple')
-rwxr-xr-xTAO/tests/Multiple/run_test.pl167
1 files changed, 117 insertions, 50 deletions
diff --git a/TAO/tests/Multiple/run_test.pl b/TAO/tests/Multiple/run_test.pl
index 328d8984aab..be8d25431f3 100755
--- a/TAO/tests/Multiple/run_test.pl
+++ b/TAO/tests/Multiple/run_test.pl
@@ -1,107 +1,174 @@
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;
+$debug_level = '0';
-$iorbase = "server.ior";
-$iorfile = PerlACE::LocalFile ("$iorbase");
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
-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";
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o $iorbase");
- $direct_colloc = "-ORBCollocationStrategy direct -o $iorbase";
- $no_colloc = "-ORBCollocation no -o $iorbase";
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
- $direct_colloc = "-ORBCollocationStrategy direct -o $iorfile";
- $no_colloc = "-ORBCollocation no -o $iorfile";
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
#
# Test using ThruPOA collocation.
#
-$SV->Spawn ();
+$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 (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_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
-$client = $CL->SpawnWaitKill (60);
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
-$SV->Kill ();
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
+
#
# Test using Direct Collocation
#
-unlink $iorfile;
+$SV->Arguments ("-ORBCollocationStrategy direct -ORBdebuglevel $debug_level -o $server_iorfile");
+
+$server_status = $SV->Spawn ();
-$SV->Arguments ($direct_colloc);
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
-$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 (60);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
-$SV->Kill ();
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
+
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
+
#
# Test using No Collocation
#
-unlink $iorfile;
+$SV->Arguments ("-ORBCollocation no -ORBdebuglevel $debug_level -o $server_iorfile");
+
+$server_status = $SV->Spawn ();
-$SV->Arguments ($no_colloc);
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
-$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_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
-$client = $CL->SpawnWaitKill (60);
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
-$SV->Kill ();
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\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
+exit $status;