summaryrefslogtreecommitdiff
path: root/TAO/tests/ORB_init
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-07 10:01:33 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-07 10:01:33 +0000
commit065877f34c820b637e0dca3a7789cbc3b2d9598c (patch)
tree6338e51b292767a5a7867cb0e11e966ac3925317 /TAO/tests/ORB_init
parent83501a40406107fe81373cac12fc8fec79f94bc9 (diff)
downloadATCD-065877f34c820b637e0dca3a7789cbc3b2d9598c.tar.gz
Mon Dec 7 09:59:08 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/EC_Custom_Marshal/run_test.pl: * orbsvcs/tests/COIOP_Naming_Test/run_test.pl: * orbsvcs/tests/Notify/Timeout/run_test.pl: * orbsvcs/tests/Notify/MT_Dispatching/run_test.pl: * orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl: * orbsvcs/tests/Notify/Reconnecting/run_test.pl: * orbsvcs/tests/Notify/Basic/run_test.pl: * orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Consumer.cpp: * orbsvcs/tests/Notify/Structured_Multi_Filter/Structured_Supplier.cpp: * orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl: * orbsvcs/tests/Notify/MC/Structured_Consumer.cpp: * orbsvcs/tests/Notify/MC/test_monitor.cpp: * orbsvcs/tests/Notify/MC/Structured_Supplier.cpp: * orbsvcs/tests/Notify/MC/run_test.pl: * orbsvcs/tests/ImplRepo/Bug_689_Regression/run_test.pl: * orbsvcs/tests/ImplRepo/scale/run_test.pl: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/MessengerServer.cpp: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/MessengerClient.cpp: * orbsvcs/tests/ImplRepo/Bug_2604_Regression/run_test.pl: * orbsvcs/tests/ImplRepo/NameService/run_test.pl: * orbsvcs/tests/ImplRepo/locked/run_test.pl: * orbsvcs/tests/ImplRepo/ReconnectServer/run_test.pl: * orbsvcs/tests/ImplRepo/run_test.pl: * orbsvcs/tests/Bug_3598b_Regression/run_test.pl: * tests/Muxing/run_test.pl: * tests/ORB_init/Portspan/run_test.pl: * tests/Bug_2183_Regression/run_test.pl: * tests/Bug_3108_Regression/run_test.pl: * bin/tao_other_tests.lst: * bin/tao_orb_tests.lst: * utils/nslist/run_test.pl: * examples/Quoter/run_test.pl: * examples/Callback_Quoter/run_test.pl: * examples/Persistent_Grid/run_test.pl: Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/tests/ORB_init')
-rwxr-xr-xTAO/tests/ORB_init/Portspan/run_test.pl64
1 files changed, 35 insertions, 29 deletions
diff --git a/TAO/tests/ORB_init/Portspan/run_test.pl b/TAO/tests/ORB_init/Portspan/run_test.pl
index 22184d41013..3ba5ad697da 100755
--- a/TAO/tests/ORB_init/Portspan/run_test.pl
+++ b/TAO/tests/ORB_init/Portspan/run_test.pl
@@ -1,44 +1,50 @@
-# $Id$
-
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;
-require ACEutils;
-
-$P1 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$P2 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$P3 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2");
-$test1 = $P1->Spawn();
-if ($test1 != 0) {
- print STDERR "ERROR: Couldn't start first server. Err:$test1\n";
- $P1->Kill();
+use PerlACE::TestTarget;
+
+$status = 0;
+
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+
+$port = $server->RandomPort ();
+
+$SV1 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
+$SV2 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
+$SV3 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
+
+$server_status = $SV1->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
exit 1;
}
-$test2 = $P2->Spawn();
-if ($test2 != 0) {
- print STDERR "ERROR: Couldn't start second server. Err:$test2\n";
- $P1->Kill();
- $P2->Kill();
+$server_status = $SV2->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $SV1->Kill ();
exit 1;
}
-$test3 = $P3->SpawnWaitKill(5);
-if ($test3 == 0) {
- print STDERR "ERROR: Last server didn't fail! Err:$test3\n";
- $P1->Kill();
- $P2->Kill();
- $P3->Kill();
+$server_status = $SV3->SpawnWaitKill ($server->ProcessStartWaitInterval());
+if ($server_status == 0) {
+ print STDERR "ERROR: Last server didn't fail! Err:$server_status\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
exit 1;
}
-$P1->Kill();
-$P2->Kill();
-$P3->Kill();
+$SV1->Kill();
+$SV2->Kill();
+$SV3->Kill();
print STDOUT "Portspan test completed successfully.\n";
-exit 0;
+exit $status;