summaryrefslogtreecommitdiff
path: root/TAO/tests/Timeout/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Timeout/run_test.pl')
-rwxr-xr-xTAO/tests/Timeout/run_test.pl46
1 files changed, 26 insertions, 20 deletions
diff --git a/TAO/tests/Timeout/run_test.pl b/TAO/tests/Timeout/run_test.pl
index ca1399d3acc..017d45036b1 100755
--- a/TAO/tests/Timeout/run_test.pl
+++ b/TAO/tests/Timeout/run_test.pl
@@ -5,38 +5,44 @@ 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;
+$cwd = getcwd();
$status = 0;
-$iorfile = PerlACE::LocalFile ("server.ior");
+$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior";
unlink $iorfile;
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-ORBDebugLevel 0 -k file://$iorfile -l 2 -h 28");
+ACE::checkForTarget($cwd);
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ " -o $iorfile");
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
+if (ACE::waitforfile_timed ($iorfile, 5) == -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 ",
+ " -ORBDebugLevel 0"
+ ." -k file://$iorfile "
+ . " -l 2 -h 28");
-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);
+ $status = 1;
}
-$server = $SV->WaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
+$server = $SV->TimedWait (5);
+if ($server == -1) {
+ print STDERR "ERROR: server timedout\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ $status = 1;
}
unlink $iorfile;