summaryrefslogtreecommitdiff
path: root/TAO/tests/RTCORBA/Private_Connection/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/RTCORBA/Private_Connection/run_test.pl')
-rwxr-xr-xTAO/tests/RTCORBA/Private_Connection/run_test.pl56
1 files changed, 31 insertions, 25 deletions
diff --git a/TAO/tests/RTCORBA/Private_Connection/run_test.pl b/TAO/tests/RTCORBA/Private_Connection/run_test.pl
index 46efef27cba..08f02da64b8 100755
--- a/TAO/tests/RTCORBA/Private_Connection/run_test.pl
+++ b/TAO/tests/RTCORBA/Private_Connection/run_test.pl
@@ -5,45 +5,51 @@ 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");
-
-unlink $iorfile1;
-unlink $iorfile2;
+ACE::checkForTarget($cwd);
print STDERR "\n********** RTCORBA Private Connection Unit Test\n\n";
-$SV = new PerlACE::Process ("server", "-o $iorfile1 -p $iorfile2");
-$CL = new PerlACE::Process ("client", "-o file://$iorfile1 -p file://$iorfile2 -ORBdebuglevel 3 ");
+unlink $iorfile1;
+unlink $iorfile2;
-$SV->Spawn ();
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ " -o $iorfile1 -p $iorfile2 ");
-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 <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$client = $CL->SpawnWaitKill (60);
+$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
+ " -o file://$iorfile1 -p file://$iorfile2 "
+ ."-ORBdebuglevel 3 ");
-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 (60);
-
-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;
-exit $status;
+if ($server != 0 || $client != 0) {
+ exit 1;
+}
+
+exit 0;