summaryrefslogtreecommitdiff
path: root/TAO/examples/PluggableUDP
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-08-05 07:00:39 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-08-05 07:00:39 +0000
commit438977c8853a81c3635eb40d8dc04ecddb952e88 (patch)
tree65fa7cf6d3e00ad2b66a09d7fb3b73b29bb95049 /TAO/examples/PluggableUDP
parentf595ae866bbde08ce879dcaeae477c6b0fd58a96 (diff)
downloadATCD-438977c8853a81c3635eb40d8dc04ecddb952e88.tar.gz
ChangeLogTag: Thu Aug 5 07:00:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/examples/PluggableUDP')
-rwxr-xr-xTAO/examples/PluggableUDP/tests/Performance/run_test.pl39
1 files changed, 21 insertions, 18 deletions
diff --git a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl
index 3b8b2e0ce46..43b481a36b6 100755
--- a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl
+++ b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl
@@ -5,33 +5,36 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require ACEutils;
-require Process;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
$status = 0;
-$iorfile = "test.ior";
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile -ORBendpoint diop://:12345");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV = new PerlACE::Process ("server", "-ORBEndpoint diop://:12345 -o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create ($EXEPREFIX."client$EXE_EXT", "-k file://$iorfile");
-if ($client->TimedWait (120) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimedWait (1);
+$client = $CL->SpawnWaitKill (90);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-if ($SV->TimedWait (1) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->WaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;