summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl')
-rwxr-xr-xTAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl67
1 files changed, 33 insertions, 34 deletions
diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
index e85431f372e..f1de2e49498 100755
--- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
+++ b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
@@ -5,52 +5,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-use lib '../../../../../bin';
-use PerlACE::Run_Test;
-
-$status = 0;
-$client_conf = PerlACE::LocalFile ("client.conf");
-$server_conf = PerlACE::LocalFile ("server.conf");
-$iorfile = PerlACE::LocalFile ("test.ior");
-
-$SV = new PerlACE::Process ("server",
- " -ORBSvcConf $server_conf"
- . " -o $iorfile");
-
-# Run client with 5 threads of low priority and 1 thread of high priority.
-
-$CL = new PerlACE::Process ("client",
- " -ORBSvcConf $client_conf "
- . " -i file://$iorfile "
- . " -n 10000 "
- . " -t 1 -t 2 -t 3 -t 4 -t 5 -t 30");
+unshift @INC, '../../../../../bin';
+require ACEutils;
+$client_conf="client.conf";
+$server_conf="server.conf";
+$iorfile="test.ior";
print STDERR "================ Single Endpoint Test\n";
unlink $iorfile;
-$SV->Spawn ();
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ " -ORBSvcConf server.conf"
+ . " -o $iorfile");
-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);
-$server = $SV->WaitKill (10);
+# Run client with 5 threads of low priority and 1 thread of high priority.
-unlink $iorfile;
+$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
+ " -ORBSvcConf client.conf "
+ . " -i file://$iorfile "
+ . " -n 10000 "
+ . " -t 1 -t 2 -t 3 -t 4 -t 5 -t 30");
+
+$client = $CL->TimedWait (60);
+if ($client == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $CL->Kill (); $CL->TimedWait (1);
+}
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
+$server = $SV->TimedWait (60);
+if ($server == -1) {
+ print STDERR "ERROR: server timedout\n";
+ $SV->Kill (); $SV->TimedWait (1);
}
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- $status = 1;
+unlink $iorfile;
+
+if ($server != 0 || $client != 0) {
+ exit 1;
}
-exit $status;
+exit 0;