summaryrefslogtreecommitdiff
path: root/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/RTCORBA/Explicit_Binding/run_test.pl')
-rwxr-xr-xTAO/tests/RTCORBA/Explicit_Binding/run_test.pl54
1 files changed, 29 insertions, 25 deletions
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
index 3d41c7f0c42..936e051a1c5 100755
--- a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
+++ b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
@@ -5,45 +5,49 @@ 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;
-$iorfile = PerlACE::LocalFile ("test.ior");
+$cwd = getcwd();
+$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-unlink $iorfile;
+ACE::checkForTarget($cwd);
print STDERR "\n********** RTCORBA Explicit Binding Unit Test\n\n";
+unlink $iorfile;
-$SV = new PerlACE::Process ("server", "-o $iorfile -ORBendpoint iiop:// -ORBendpoint shmiop://");
-$CL = new PerlACE::Process ("client", "-o file://$iorfile -ORBdebuglevel 1");
-
-$SV->Spawn ();
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ " -o $iorfile "
+ ."-ORBendpoint iiop:// "
+ ."-ORBendpoint shmiop://");
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
+if (ACE::waitforfile_timed ($iorfile, 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://$iorfile -ORBdebuglevel 1 ");
-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 $iorfile;
-# Clean up SHMIOP files
-unlink glob ("server_shmiop_*");
+if ($server != 0 || $client != 0) {
+ exit 1;
+}
-exit $status;
+exit 0;