summaryrefslogtreecommitdiff
path: root/TAO/examples/Persistent_Grid/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/Persistent_Grid/run_test.pl')
-rwxr-xr-xTAO/examples/Persistent_Grid/run_test.pl66
1 files changed, 26 insertions, 40 deletions
diff --git a/TAO/examples/Persistent_Grid/run_test.pl b/TAO/examples/Persistent_Grid/run_test.pl
index eda66975a42..91ac2ec3544 100755
--- a/TAO/examples/Persistent_Grid/run_test.pl
+++ b/TAO/examples/Persistent_Grid/run_test.pl
@@ -6,63 +6,49 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-use PerlACE::Run_Test;
+require ACEutils;
+require Process;
-$iorfile = PerlACE::LocalFile ("grid.ior");
-$mem = PerlACE::LocalFile ("foo");
-$status = 0;
+$iorfile = "grid.ior";
+$mem = "foo";
-$SV = new PerlACE::Process ("server", "-o $iorfile -m $mem");
-$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-$PCL = new PerlACE::Process ("persistent_client", "-k file://$iorfile -w 10 -h 10");
+$SV = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-o $iorfile -m $mem");
-$SV->Spawn ();
-
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: Could not find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
+if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$client = $CL->SpawnWaitKill (60);
-
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
+$client = Process::Create ($EXEPREFIX."client$Process::EXE_EXT -k file://$iorfile ");
+if ($client->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $client->Kill (); $client->TimeWait (1);
}
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
+$SV->Kill (); $SV->TimedWait (1);
unlink $iorfile;
-$SV->Spawn ();
+$server = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-o $iorfile -m $mem");
-if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: Could not find file <$iorfile>\n";
- $server->Kill ();
- exit 1;
+if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
+ $server->Kill (); $server->TimedWait (1);
+ exit 1;
}
-$pclient = $PCL->SpawnWaitKill (60);
+$per_client = Process::Create ($EXEPREFIX."persistent_client$Process::EXE_EXT -k file://$iorfile -w 10 -h 10");
-if ($pclient != 0) {
- print STDERR "ERROR: persistent client returned $pclient\n";
- $status = 1;
+if ($per_client->TimedWait (60) == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $status = 1;
+ $perclient->Kill (); $per_client->TimeWait (1);
}
-$server = $SV->TerminateWaitKill (5);
-
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
-}
+$server->Kill (); $server->TimedWait (1);
unlink $iorfile;
unlink $mem;
-
exit $status;