summaryrefslogtreecommitdiff
path: root/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/RTCORBA/Banded_Connections/run_test.pl')
-rwxr-xr-xTAO/tests/RTCORBA/Banded_Connections/run_test.pl65
1 files changed, 33 insertions, 32 deletions
diff --git a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
index 088e884a9da..4ee9d671786 100755
--- a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
+++ b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
@@ -5,20 +5,20 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-use lib '../../../../bin';
-use PerlACE::Run_Test;
+unshift @INC, '../../../../bin';
+require ACEutils;
+use Cwd;
-$status = 0;
+$cwd = getcwd();
+$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
+$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
-$iorfile1 = PerlACE::LocalFile ("test1.ior");
-$iorfile2 = PerlACE::LocalFile ("test2.ior");
-$server_conf = PerlACE::LocalFile ("server.conf");
-
-unlink $iorfile1;
-unlink $iorfile2;
+ACE::checkForTarget($cwd);
print STDERR "\n********** RTCORBA Priority Banded Connections Unit Test\n";
+unlink $iorfile1;
+unlink $iorfile2;
# CORBA priorities 66, 75 and 80, etc. are for the SCHED_OTHER class on
# Solaris. May need to use different values for other platforms
@@ -26,7 +26,7 @@ print STDERR "\n********** RTCORBA Priority Banded Connections Unit Test\n";
# available range.
$server_args =
- "-n $iorfile1 -o $iorfile2 -b bands.unix -ORBSvcConf $server_conf "
+ "-n $iorfile1 -o $iorfile2 -b bands.unix -ORBSvcConf server.conf "
."-ORBdebuglevel 1 -p 67 -w 78 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=66 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=75 "
@@ -36,9 +36,10 @@ $client_args =
"-n file://$iorfile1 -o file://$iorfile2 "
."-a 76 -b 80 -c 64";
-if ($^O eq "MSWin32") {
+if ($^O eq "MSWin32")
+{
$server_args =
- "-n $iorfile1 -o $iorfile2 -b bands.nt -ORBSvcConf $server_conf "
+ "-n $iorfile1 -o $iorfile2 -b bands.nt -ORBSvcConf server.conf "
."-ORBdebuglevel 1 -p 1 -w 3 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=2 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=5 "
@@ -49,35 +50,35 @@ if ($^O eq "MSWin32") {
."-a 4 -b 6 -c 3";
}
-$SV = new PerlACE::Process ("server", $server_args);
-$CL = new PerlACE::Process ("client", $client_args);
-
-$SV->Spawn ();
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ $server_args);
-if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill ();
- exit 1;
+if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$client = $CL->SpawnWaitKill (60);
+$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
+ $client_args);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
+$client = $CL->TimedWait (60);
+if ($client == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $CL->Kill (); $CL->TimedWait (1);
}
-$server = $SV->WaitKill (30);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
+$server = $SV->TimedWait (60);
+if ($server == -1) {
+ print STDERR "ERROR: server timedout\n";
+ $SV->Kill (); $SV->TimedWait (1);
}
unlink $iorfile1;
unlink $iorfile2;
-# Clean up SHMIOP files
-unlink glob ("server_shmiop_*");
+if ($server != 0 || $client != 0) {
+ exit 1;
+}
-exit $status;
+exit 0;