summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-02 02:31:02 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-02 02:31:02 +0000
commit275a2aeae5edb048dfce21164cb8987f7c257103 (patch)
tree16f8545dce299ef75df3854cc7cf2988a6193884
parentfc27060636580dd259406d1c59f2d73787a11f9c (diff)
downloadATCD-275a2aeae5edb048dfce21164cb8987f7c257103.tar.gz
ChangeLogTag:Thu Mar 1 18:24:32 2001 Darrell Brunsch <brunsch@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a36
-rwxr-xr-xTAO/examples/POA/Adapter_Activator/run_test.pl139
-rw-r--r--TAO/examples/POA/Adapter_Activator/server.dsp2
-rw-r--r--TAO/examples/POA/DSI/client.dsp4
-rwxr-xr-xTAO/examples/POA/DSI/run_test.pl44
-rw-r--r--TAO/examples/POA/DSI/server.dsp2
-rw-r--r--TAO/examples/POA/Default_Servant/client.dsp2
-rwxr-xr-xTAO/examples/POA/Default_Servant/run_test.pl26
-rw-r--r--TAO/examples/POA/Default_Servant/server.dsp2
-rwxr-xr-xTAO/examples/POA/Explicit_Activation/run_test.pl138
-rw-r--r--TAO/examples/POA/FindPOA/FindPOA.dsp2
-rwxr-xr-xTAO/examples/POA/FindPOA/run_test.pl13
-rw-r--r--TAO/examples/POA/Forwarding/client.dsp2
-rwxr-xr-xTAO/examples/POA/Forwarding/run_test.pl150
-rw-r--r--TAO/examples/POA/Forwarding/server.dsp2
-rw-r--r--TAO/examples/POA/Generic_Servant/client.dsp2
-rwxr-xr-xTAO/examples/POA/Loader/run_test.pl99
-rw-r--r--TAO/examples/POA/NewPOA/NewPOA.dsp2
-rwxr-xr-xTAO/examples/POA/NewPOA/run_test.pl15
-rwxr-xr-xTAO/examples/POA/On_Demand_Activation/run_test.pl115
-rw-r--r--TAO/examples/POA/On_Demand_Activation/server.dsp2
-rwxr-xr-xTAO/examples/POA/On_Demand_Loading/run_test.pl115
-rwxr-xr-xTAO/examples/POA/Reference_Counted_Servant/run_test.pl93
-rw-r--r--TAO/examples/POA/Reference_Counted_Servant/server.dsp2
-rw-r--r--TAO/examples/POA/RootPOA/RootPOA.dsp2
-rwxr-xr-xTAO/examples/POA/RootPOA/run_test.pl16
-rw-r--r--TAO/examples/POA/TIE/client.dsp2
-rwxr-xr-xTAO/examples/POA/TIE/run_test.pl53
-rw-r--r--TAO/examples/POA/TIE/server.dsp2
29 files changed, 523 insertions, 561 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index ee2d6be044c..9229d47f65c 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,39 @@
+Thu Mar 1 18:24:32 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * examples/POA/Adapter_Activator/server.dsp:
+ * examples/POA/DSI/client.dsp:
+ * examples/POA/DSI/server.dsp:
+ * examples/POA/Default_Servant/client.dsp:
+ * examples/POA/Default_Servant/server.dsp:
+ * examples/POA/FindPOA/FindPOA.dsp:
+ * examples/POA/Forwarding/client.dsp:
+ * examples/POA/Forwarding/server.dsp:
+ * examples/POA/Generic_Servant/client.dsp:
+ * examples/POA/NewPOA/NewPOA.dsp:
+ * examples/POA/On_Demand_Activation/server.dsp:
+ * examples/POA/Reference_Counted_Servant/server.dsp:
+ * examples/POA/RootPOA/RootPOA.dsp:
+ * examples/POA/TIE/client.dsp:
+ * examples/POA/TIE/server.dsp:
+
+ Release executables go into Release subdirectory.
+
+ * examples/POA/Adapter_Activator/run_test.pl:
+ * examples/POA/DSI/run_test.pl:
+ * examples/POA/Default_Servant/run_test.pl:
+ * examples/POA/Explicit_Activation/run_test.pl:
+ * examples/POA/FindPOA/run_test.pl:
+ * examples/POA/Forwarding/run_test.pl:
+ * examples/POA/Loader/run_test.pl:
+ * examples/POA/NewPOA/run_test.pl:
+ * examples/POA/On_Demand_Activation/run_test.pl:
+ * examples/POA/On_Demand_Loading/run_test.pl:
+ * examples/POA/Reference_Counted_Servant/run_test.pl:
+ * examples/POA/RootPOA/run_test.pl:
+ * examples/POA/TIE/run_test.pl:
+
+ More scripts using PerlACE::Run_Test. Yay!
+
Thu Mar 1 18:51:45 2001 Jeff Parsons <parsons@cs.wustl.edu>
* TAO_IDL/be/be_visitor_array/array_ch.cpp:
diff --git a/TAO/examples/POA/Adapter_Activator/run_test.pl b/TAO/examples/POA/Adapter_Activator/run_test.pl
index 50adfaabb8e..362aeb84c0f 100755
--- a/TAO/examples/POA/Adapter_Activator/run_test.pl
+++ b/TAO/examples/POA/Adapter_Activator/run_test.pl
@@ -6,49 +6,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ior");
+$status = 0;
$oneway = "";
$iterations = 100;
$extra_args = "";
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-f -- ior file\n";
- print "-i iterations -- specifies iterations\n";
- print "-o -- call issued are oneways\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-f -- ior file\n";
+ print "-i iterations -- specifies iterations\n";
+ print "-o -- call issued are oneways\n";
+ exit;
}
- if ($ARGV[$i] eq "-o")
- {
- $oneway = "-o";
- last SWITCH;
+ elsif ($ARGV[$i] eq "-o") {
+ $oneway = "-o";
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = $ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-f")
- {
- $iorfile = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-f") {
+ $iorfile = $ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $extra_args .= " " . $ARGV[$i];
}
- $extra_args .= " " . $ARGV[$i];
- }
}
$iorfile_1 = $iorfile."_1";
@@ -59,68 +51,65 @@ unlink $iorfile_1;
unlink $iorfile_2;
unlink $iorfile_3;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
-if (ACE::waitforfile_timed ($iorfile_1, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_1>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL = new PerlACE::Process ("../Generic_Servant/client");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile_1, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_1>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_2, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_2, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_2>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_3, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_3>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_3, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_3>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL_1 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_1");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_1");
-$client_1 = $CL_1->TimedWait (60);
-if ($client_1 == -1) {
- print STDERR "ERROR: client 1 timedout\n";
- $CL_1->Kill (); $CL_1->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-$CL_2 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_2");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_2");
+
+$client = $CL->SpawnWaitKill (60);
-$client_2 = $CL_2->TimedWait (60);
-if ($client_2 == -1) {
- print STDERR "ERROR: client 2 timedout\n";
- $CL_2->Kill (); $CL_2->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
}
-$CL_3 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_3 -x");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_3 -x");
-$client_3 = $CL_3->TimedWait (60);
-if ($client_3 == -1) {
- print STDERR "ERROR: client 3 timedout\n";
- $CL_3->Kill (); $CL_3->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 3 returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile_1;
unlink $iorfile_2;
unlink $iorfile_3;
-if ($server != 0 ||
- $client_1 != 0 ||
- $client_2 != 0 ||
- $client_3 != 0 )
-{
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/examples/POA/Adapter_Activator/server.dsp b/TAO/examples/POA/Adapter_Activator/server.dsp
index 54adc81d7aa..6dd9ccb2a72 100644
--- a/TAO/examples/POA/Adapter_Activator/server.dsp
+++ b/TAO/examples/POA/Adapter_Activator/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/DSI/client.dsp b/TAO/examples/POA/DSI/client.dsp
index fdf52ef6abe..dcd5bc292cf 100644
--- a/TAO/examples/POA/DSI/client.dsp
+++ b/TAO/examples/POA/DSI/client.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 tao.lib ace.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release/client.exe" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+# ADD LINK32 tao.lib ace.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "POA DSI Client - Win32 Debug"
diff --git a/TAO/examples/POA/DSI/run_test.pl b/TAO/examples/POA/DSI/run_test.pl
index e1b276659fe..d6f3b2ff7bb 100755
--- a/TAO/examples/POA/DSI/run_test.pl
+++ b/TAO/examples/POA/DSI/run_test.pl
@@ -6,39 +6,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "server.ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", " -f $iorfile");
+$SV = new PerlACE::Process ("server", "-f $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile -x");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -f $iorfile -x");
+$client = $CL->SpawnWaitKill (60);
+$server = $SV->WaitKill (5);
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
+unlink $iorfile;
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-
-unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-exit 0;
+exit $status;
diff --git a/TAO/examples/POA/DSI/server.dsp b/TAO/examples/POA/DSI/server.dsp
index 86910bcb960..f42c6e5489f 100644
--- a/TAO/examples/POA/DSI/server.dsp
+++ b/TAO/examples/POA/DSI/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Default_Servant/client.dsp b/TAO/examples/POA/Default_Servant/client.dsp
index 148b016b1d1..d97916bdc84 100644
--- a/TAO/examples/POA/Default_Servant/client.dsp
+++ b/TAO/examples/POA/Default_Servant/client.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Default_Servant/run_test.pl b/TAO/examples/POA/Default_Servant/run_test.pl
index f3b103eb413..c232bbd92b8 100755
--- a/TAO/examples/POA/Default_Servant/run_test.pl
+++ b/TAO/examples/POA/Default_Servant/run_test.pl
@@ -9,6 +9,7 @@ use lib "../../../../bin";
use PerlACE::Run_Test;
$iorfile = PerlACE::LocalFile ("server.ior");
+$status = 0;
unlink $iorfile;
@@ -18,20 +19,25 @@ $CL = new PerlACE::Process ("client", "-k $iorfile");
$SV->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- exit 1;
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
$client = $CL->SpawnWaitKill (60);
-
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
-}
-
-$SV->Kill ();
+$server = $SV->TerminateWaitKill (10);
unlink $iorfile;
unlink "test"; # created by the program
-exit $client;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+exit $status;
diff --git a/TAO/examples/POA/Default_Servant/server.dsp b/TAO/examples/POA/Default_Servant/server.dsp
index 3b30549e78a..002a2e1635d 100644
--- a/TAO/examples/POA/Default_Servant/server.dsp
+++ b/TAO/examples/POA/Default_Servant/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Explicit_Activation/run_test.pl b/TAO/examples/POA/Explicit_Activation/run_test.pl
index 3f3ac9042f1..29e0df4b70f 100755
--- a/TAO/examples/POA/Explicit_Activation/run_test.pl
+++ b/TAO/examples/POA/Explicit_Activation/run_test.pl
@@ -6,9 +6,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ior");
$oneway = "";
$iterations = 100;
@@ -16,39 +16,30 @@ $iterations = 100;
$extra_args = "";
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-f -- ior file\n";
- print "-i iterations -- specifies iterations\n";
- print "-o -- call issued are oneways\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-f -- ior file\n";
+ print "-i iterations -- specifies iterations\n";
+ print "-o -- call issued are oneways\n";
+ exit;
}
- if ($ARGV[$i] eq "-o")
- {
- $oneway = "-o";
- last SWITCH;
+ elsif ($ARGV[$i] eq "-o") {
+ $oneway = "-o";
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = $ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-f")
- {
- $iorfile = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-f") {
+ $iorfile = $ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $extra_args .= " " . $ARGV[$i];
}
- $extra_args .= " " . $ARGV[$i];
- }
}
$iorfile_1 = $iorfile."_1";
@@ -59,70 +50,67 @@ unlink $iorfile_1;
unlink $iorfile_2;
unlink $iorfile_3;
+$status = 0;
+
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL = new PerlACE::Process ("../Generic_Servant/client");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile_1, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_1>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_1, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_1>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_2>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_3, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_3>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_3, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_3>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL_1 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_1");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_1");
-$client_1 = $CL_1->TimedWait (60);
-if ($client_1 == -1) {
- print STDERR "ERROR: client 1 timedout\n";
- $CL_1->Kill (); $CL_1->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-$CL_2 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_2");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_2");
+
+$client = $CL->SpawnWaitKill (60);
-$client_2 = $CL_2->TimedWait (60);
-if ($client_2 == -1) {
- print STDERR "ERROR: client 2 timedout\n";
- $CL_2->Kill (); $CL_2->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
}
-$CL_3 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_3 -x");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_3 -x");
-$client_3 = $CL_3->TimedWait (60);
-if ($client_3 == -1) {
- print STDERR "ERROR: client 3 timedout\n";
- $CL_3->Kill (); $CL_3->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 3 returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (10);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$server = $SV->WaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile_1;
unlink $iorfile_2;
unlink $iorfile_3;
-if ($server != 0 ||
- $client_1 != 0 ||
- $client_2 != 0 ||
- $client_3 != 0)
-{
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/examples/POA/FindPOA/FindPOA.dsp b/TAO/examples/POA/FindPOA/FindPOA.dsp
index ed91441a4e1..c38739d7e5d 100644
--- a/TAO/examples/POA/FindPOA/FindPOA.dsp
+++ b/TAO/examples/POA/FindPOA/FindPOA.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/FindPOA/run_test.pl b/TAO/examples/POA/FindPOA/run_test.pl
index 8dbd08be7cd..87656fc7ba2 100755
--- a/TAO/examples/POA/FindPOA/run_test.pl
+++ b/TAO/examples/POA/FindPOA/run_test.pl
@@ -6,14 +6,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$TEST = Process::Create ($EXEPREFIX."FindPOA$EXE_EXT","");
+$T = new PerlACE::Process ("FindPOA");
-if ($TEST->TimedWait (60) == -1){
- print STDERR "ERROR: test timedout\n";
- $TEST->Kill (); $TEST->TimedWait(1);
- exit 1;
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/examples/POA/Forwarding/client.dsp b/TAO/examples/POA/Forwarding/client.dsp
index 6d5579696fb..87f133ca813 100644
--- a/TAO/examples/POA/Forwarding/client.dsp
+++ b/TAO/examples/POA/Forwarding/client.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Forwarding/run_test.pl b/TAO/examples/POA/Forwarding/run_test.pl
index 88b4cfd9d7f..79d038794be 100755
--- a/TAO/examples/POA/Forwarding/run_test.pl
+++ b/TAO/examples/POA/Forwarding/run_test.pl
@@ -6,100 +6,80 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-use ACEutils;
+use PerlACE::Run_Test;
-# Set STDERR to autoflush (weird unbufferd output stuff)
+# Set STDERR to autoflush (weird unbuffered output stuff)
$| = 1;
# Make pretty look thing
print STDERR "\n";
-# IOR files must be cleaned up before next run
-sub cleanup_ior
-{
- unlink "server1", "server2", "server3";
+$status = 0;
+
+$iorfile1 = PerlACE::LocalFile ("server1.ior");
+$iorfile2 = PerlACE::LocalFile ("server2.ior");
+$iorfile3 = PerlACE::LocalFile ("server3.ior");
+
+unlink $iorfile1, $iorfile2, $iorfile3;
+
+$SV1 = new PerlACE::Process ("server", "-o $iorfile1");
+$SV2 = new PerlACE::Process ("server", "-o $iorfile2 -f file://$iorfile1");
+$SV3 = new PerlACE::Process ("server", "-o $iorfile3 -f file://$iorfile2");
+$CL = new PerlACE::Process ("client", "-s 3 -k file://$iorfile3");
+
+
+$SV1->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile1, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile1>\n";
+ $SV1->Kill ();
+ exit 1;
}
-# Run the test in it's three forms
-sub run_test
-{
- # Run the servers
- $args = "-o server1";
- $SRV1 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- $args);
- print STDERR ("server $args\n");
-
- if (ACE::waitforfile_timed ("server1", 15) == -1)
- {
- print STDERR "ERROR: cannot find file <server1> or <server2>\n";
- $SRV1->Kill (); $SRV1->TimedWait (1);
- exit 1;
- }
-
- $args = "-o server2 -f file://server1";
- $SRV2 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- $args);
- print STDERR ("server $args\n");
-
- if (ACE::waitforfile_timed ("server2", 15) == -1)
- {
- print STDERR "ERROR: cannot find file <server1> or <server2>\n";
- $SRV1->Kill (); $SRV1->TimedWait (1);
- $SRV2->Kill (); $SRV2->TimedWait (1);
- exit 1;
- }
-
- $args = "-o server3 -f file://server2";
- $SRV3 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- $args);
- print STDERR ("server $args\n");
-
- if (ACE::waitforfile_timed ("server3", 15) == -1)
- {
- print STDERR "ERROR: cannot find file <server3>\n";
- $SRV1->Kill (); $SRV1->TimedWait (1);
- $SRV2->Kill (); $SRV2->TimedWait (1);
- $SRV3->Kill (); $SRV3->TimedWait (1);
- exit 1;
- }
-
- # Run the client and block until completion
- $args = "-s 3 -k file://server3";
- $CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- $args);
- print STDERR ("client $args\n");
-
- $client = $CL->TimedWait (60);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
+$SV2->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile2, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
+ exit 1;
+}
+
+$SV3->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile3, 15) == -1) {
+ print STDERR "ERROR: cannot find file <server3>\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
+ $SV3->Kill ();
+ exit 1;
+}
- # Now that the client has finished, kill off the servers
- if ($SRV1->TimedWait (10) == -1 ||
- $SRV2->TimedWait (10) == -1 ||
- $SRV3->TimedWait (10))
- {
- print STDERR "ERROR: couldn't terminate the servers nicely\n";
- $SRV1->Kill (); $SRV1->TimedWait (1);
- $SRV2->Kill (); $SRV2->TimedWait (1);
- $SRV3->Kill (); $SRV3->TimedWait (1);
- $status = 1;
- }
+$client = $CL->SpawnWaitKill (60);
+$server1 = $SV1->WaitKill (10);
+$server2 = $SV2->WaitKill (10);
+$server3 = $SV3->WaitKill (10);
+
+unlink $iorfile1, $iorfile2, $iorfile3;
- if ($client != 0)
- {
- print STDERR ("\nTest FAILED\n");
- $status = -1;
- }
- else
- {
- print STDERR ("\nTest SUCCEEDED\n");
- }
- return $status;
-}
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+if ($server1 != 0) {
+ print STDERR "ERROR: server 1 returned $server\n";
+ $status = 1;
+}
+
+if ($server2 != 0) {
+ print STDERR "ERROR: server 2 returned $server\n";
+ $status = 1;
+}
-cleanup_ior ();
-run_test ();
-cleanup_ior ();
+if ($server3 != 0) {
+ print STDERR "ERROR: server 3 returned $server\n";
+ $status = 1;
+}
+exit $status;
diff --git a/TAO/examples/POA/Forwarding/server.dsp b/TAO/examples/POA/Forwarding/server.dsp
index 418cf589518..7003c73b780 100644
--- a/TAO/examples/POA/Forwarding/server.dsp
+++ b/TAO/examples/POA/Forwarding/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Generic_Servant/client.dsp b/TAO/examples/POA/Generic_Servant/client.dsp
index da6a41ff98c..c9b9ff6ecff 100644
--- a/TAO/examples/POA/Generic_Servant/client.dsp
+++ b/TAO/examples/POA/Generic_Servant/client.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/Loader/run_test.pl b/TAO/examples/POA/Loader/run_test.pl
index df75e4ab963..9a8ff679ab4 100755
--- a/TAO/examples/POA/Loader/run_test.pl
+++ b/TAO/examples/POA/Loader/run_test.pl
@@ -6,22 +6,19 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ior");
+$status = 0;
$oneway = "";
$iterations = 100;
$extra_args = "";
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
print "\n";
print "-h -- prints this information\n";
@@ -30,25 +27,20 @@ for ($i = 0; $i <= $#ARGV; $i++)
print "-o -- call issued are oneways\n";
exit;
}
- if ($ARGV[$i] eq "-o")
- {
- $oneway = "-o";
- last SWITCH;
+ elsif ($ARGV[$i] eq "-o") {
+ $oneway = "-o";
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = $ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-f")
- {
- $iorfile = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-f") {
+ $iorfile = $ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $extra_args .= " " . $ARGV[$i];
}
- $extra_args .= " " . $ARGV[$i];
- }
}
$iorfile_1 = $iorfile."_1";
@@ -57,50 +49,49 @@ $iorfile_2 = $iorfile."_2";
unlink $iorfile_1;
unlink $iorfile_2;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL = new PerlACE::Process ("../Generic_Servant/client");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile_1, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_1>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_1, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_1>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_2, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_2, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_2>\n";
+ $SV->Kill ();
+ exit 1;
}
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_1");
-$CL_1 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_1");
+$client = $CL->SpawnWaitKill (60);
-$client_1 = $CL_1->TimedWait (60);
-if ($client_1 == -1) {
- print STDERR "ERROR: client 1 timedout\n";
- $CL_1->Kill (); $CL_1->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-$CL_2 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_2 -x");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_2 -x");
+
+$client = $CL->SpawnWaitKill (60);
-$client_2 = $CL_2->TimedWait (60);
-if ($client_2 == -1){
- print STDERR "ERROR: client 2 timedout\n";
- $CL_2->Kill (); $CL_2->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile_1;
unlink $iorfile_2;
-if ($server !=0 || $client_1 != 0 || $client_2 != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/examples/POA/NewPOA/NewPOA.dsp b/TAO/examples/POA/NewPOA/NewPOA.dsp
index 957ed993c42..cb39e6c5867 100644
--- a/TAO/examples/POA/NewPOA/NewPOA.dsp
+++ b/TAO/examples/POA/NewPOA/NewPOA.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/NewPOA/run_test.pl b/TAO/examples/POA/NewPOA/run_test.pl
index 5f26e84ff8a..15c52166829 100755
--- a/TAO/examples/POA/NewPOA/run_test.pl
+++ b/TAO/examples/POA/NewPOA/run_test.pl
@@ -6,12 +6,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$TEST = Process::Create ($EXEPREFIX."NewPOA$EXE_EXT", "");
-if ($TEST->TimedWait (60) == -1) {
- print STDERR "ERROR: test timedout\n";
- $TEST->Kill (); $TEST->TimedWait (1);
- exit 1;
+$T = new PerlACE::Process ("NewPOA");
+
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
+
exit 0;
diff --git a/TAO/examples/POA/On_Demand_Activation/run_test.pl b/TAO/examples/POA/On_Demand_Activation/run_test.pl
index c0396291542..7daf906a9ef 100755
--- a/TAO/examples/POA/On_Demand_Activation/run_test.pl
+++ b/TAO/examples/POA/On_Demand_Activation/run_test.pl
@@ -6,9 +6,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ior");
$oneway = "";
$iterations = 100;
@@ -16,39 +16,30 @@ $iterations = 100;
$extra_args = "";
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-f -- ior file\n";
- print "-i iterations -- specifies iterations\n";
- print "-o -- call issued are oneways\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-f -- ior file\n";
+ print "-i iterations -- specifies iterations\n";
+ print "-o -- call issued are oneways\n";
+ exit;
}
- if ($ARGV[$i] eq "-o")
- {
- $oneway = "-o";
- last SWITCH;
+ elsif ($ARGV[$i] eq "-o") {
+ $oneway = "-o";
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = $ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-f")
- {
- $iorfile = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-f") {
+ $iorfile = $ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $extra_args .= " " . $ARGV[$i];
}
- $extra_args .= " " . $ARGV[$i];
- }
}
$iorfile_1 = $iorfile."_1";
@@ -57,49 +48,51 @@ $iorfile_2 = $iorfile."_2";
unlink $iorfile_1;
unlink $iorfile_2;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL = new PerlACE::Process ("../Generic_Servant/client");
+
+$status = 0;
-if (ACE::waitforfile_timed ($iorfile_1, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_1>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile_1, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_1>\n";
+ $SV->Kill ();
+ exit 1;
}
-if (ACE::waitforfile_timed ($iorfile_2, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_2, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile_2>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL_1 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- "$extra_args $oneway -i $iterations -f $iorfile_1");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_1");
+
+$client = $CL->SpawnWaitKill (60);
-$client_1 = $CL_1->TimedWait (60);
-if ($client_1 == -1) {
- print STDERR "ERROR: client 1 timedout\n";
- $CL_1->Kill (); $CL_1->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-$CL_2 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- "$extra_args $oneway -i $iterations -f $iorfile_2 -x");
+$CL->Arguments ("$extra_args $oneway -i $iterations -f $iorfile_2 -x");
-$client_2 = $CL_2->TimedWait (60);
-if ($client_2 == -1) {
- print STDERR "ERROR: client 2 timedout\n";
- $CL_2->Kill (); $CL_2->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile_1;
unlink $iorfile_2;
-if ($server != 0 || $client_1 != 0 || $client_2 != 0){
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/examples/POA/On_Demand_Activation/server.dsp b/TAO/examples/POA/On_Demand_Activation/server.dsp
index 72f35174b38..343f1aac054 100644
--- a/TAO/examples/POA/On_Demand_Activation/server.dsp
+++ b/TAO/examples/POA/On_Demand_Activation/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/On_Demand_Loading/run_test.pl b/TAO/examples/POA/On_Demand_Loading/run_test.pl
index 485b9b440a4..e6c8c8f2195 100755
--- a/TAO/examples/POA/On_Demand_Loading/run_test.pl
+++ b/TAO/examples/POA/On_Demand_Loading/run_test.pl
@@ -6,7 +6,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
$iorfile = "ior";
@@ -15,93 +15,82 @@ $iterations = 100;
$extra_args = "";
+$status = 0;
+
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-f -- ior file\n";
- print "-i iterations -- specifies iterations\n";
- print "-o -- call issued are oneways\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-f -- ior file\n";
+ print "-i iterations -- specifies iterations\n";
+ print "-o -- call issued are oneways\n";
+ exit;
}
- if ($ARGV[$i] eq "-o")
- {
+ elsif ($ARGV[$i] eq "-o") {
$oneway = "-o";
- last SWITCH;
}
- if ($ARGV[$i] eq "-i")
- {
+ elsif ($ARGV[$i] eq "-i") {
$iterations = $ARGV[$i + 1];
$i++;
- last SWITCH;
}
- if ($ARGV[$i] eq "-f")
- {
+ elsif ($ARGV[$i] eq "-f") {
$iorfile = $ARGV[$i + 1];
$i++;
- last SWITCH;
}
- $extra_args .= " " . $ARGV[$i];
- }
+ else {
+ $extra_args .= " " . $ARGV[$i];
+ }
}
-$iorfile_1 = $iorfile."_1";
-$iorfile_2 = $iorfile."_2";
+$iorfile1 = $iorfile."_1";
+$iorfile2 = $iorfile."_2";
-unlink $iorfile_1;
-unlink $iorfile_2;
+unlink $iorfile1, $iorfile2;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL1 = new PerlACE::Process ("../Generic_Servant/client",
+ "$extra_args $oneway -i $iterations -f $iorfile1");
+$CL2 = new PerlACE::Process ("../Generic_Servant/client",
+ "$extra_args $oneway -i $iterations -f $iorfile2 -x");
-if (ACE::waitforfile_timed ($iorfile_1, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_1>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile_2, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile_2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile1, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile1>\n";
+ $SV->Kill ();
+ exit 1;
}
-
-
-$CL_1 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_1");
-
-$client_1 = $CL_1->TimedWait (60);
-if ($client_1 == -1) {
- print STDERR "ERROR: client 1 timedout\n";
- $CL_1->Kill (); $CL_1->TimedWait (1);
+if (PerlACE::waitforfile_timed ($iorfile2, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL_2 = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile_2 -x");
+$client = $CL1->SpawnWaitKill (60);
-$client_2 = $CL_2->TimedWait (60);
-if ($client_2 == -1) {
- print STDERR "ERROR: client 2 timedout\n";
- $CL_2->Kill (); $CL_2->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$client = $CL2->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
}
-unlink $iorfile_1;
-unlink $iorfile_2;
+$server = $SV->WaitKill (5);
-if ($server != 0 || $client_1 != 0 || $client_2 != 0) {
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $SV->Kill ();
+ $status = 1;
}
-exit 0;
+unlink $iorfile1, $iorfile2;
+
+exit $status;
diff --git a/TAO/examples/POA/Reference_Counted_Servant/run_test.pl b/TAO/examples/POA/Reference_Counted_Servant/run_test.pl
index f9d043d4083..99631aec9c6 100755
--- a/TAO/examples/POA/Reference_Counted_Servant/run_test.pl
+++ b/TAO/examples/POA/Reference_Counted_Servant/run_test.pl
@@ -6,9 +6,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("poa.ior");
$oneway = "";
$iterations = 100;
@@ -16,70 +16,61 @@ $iterations = 100;
$extra_args = "";
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
- print "\n";
- print "-h -- prints this information\n";
- print "-f -- ior file\n";
- print "-i iterations -- specifies iterations\n";
- print "-o -- call issued are oneways\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-h] [-i iterations] [-o] [-f ior file]\n";
+ print "\n";
+ print "-h -- prints this information\n";
+ print "-f -- ior file\n";
+ print "-i iterations -- specifies iterations\n";
+ print "-o -- call issued are oneways\n";
+ exit;
}
- if ($ARGV[$i] eq "-o")
- {
- $oneway = "-o";
- last SWITCH;
+ elsif ($ARGV[$i] eq "-o") {
+ $oneway = "-o";
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = $ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-f")
- {
- $iorfile = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-f") {
+ $iorfile = $ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $extra_args .= " " . $ARGV[$i];
}
- $extra_args .= " " . $ARGV[$i];
- }
}
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-f $iorfile $extra_args");
+$SV = new PerlACE::Process ("server", "-f $iorfile $extra_args");
+$CL = new PerlACE::Process ("../Generic_Servant/client", "$extra_args $oneway -i $iterations -f $iorfile -x");
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$status = 0;
-$CL = Process::Create ("../Generic_Servant/client$EXE_EXT ",
- " $extra_args $oneway -i $iterations -f $iorfile -x");
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-unlink $iorfile;
+$server = $SV->WaitKill (5);
-if ($server != 0 || $client != 0){
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-exit 0;
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/examples/POA/Reference_Counted_Servant/server.dsp b/TAO/examples/POA/Reference_Counted_Servant/server.dsp
index efa67573d53..a53303ee6c0 100644
--- a/TAO/examples/POA/Reference_Counted_Servant/server.dsp
+++ b/TAO/examples/POA/Reference_Counted_Servant/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/RootPOA/RootPOA.dsp b/TAO/examples/POA/RootPOA/RootPOA.dsp
index cfd3aa19f65..514e9da5336 100644
--- a/TAO/examples/POA/RootPOA/RootPOA.dsp
+++ b/TAO/examples/POA/RootPOA/RootPOA.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/RootPOA/run_test.pl b/TAO/examples/POA/RootPOA/run_test.pl
index 3c1eaa1bbea..c0f3a87b057 100755
--- a/TAO/examples/POA/RootPOA/run_test.pl
+++ b/TAO/examples/POA/RootPOA/run_test.pl
@@ -6,19 +6,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use Process;
-use ACEutils;
+use PerlACE::Run_Test;
-$T = Process::Create ($EXEPREFIX."RootPOA".$EXE_EXT);
+$T = new PerlACE::Process ("RootPOA");
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
+$test = $T->SpawnWaitKill (60);
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/examples/POA/TIE/client.dsp b/TAO/examples/POA/TIE/client.dsp
index d4d8a86d924..6e057006e8c 100644
--- a/TAO/examples/POA/TIE/client.dsp
+++ b/TAO/examples/POA/TIE/client.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
diff --git a/TAO/examples/POA/TIE/run_test.pl b/TAO/examples/POA/TIE/run_test.pl
index 77ebf1abcfd..6b31ad1ad2b 100755
--- a/TAO/examples/POA/TIE/run_test.pl
+++ b/TAO/examples/POA/TIE/run_test.pl
@@ -6,11 +6,11 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib '../../../../bin';
-use ACEutils;
+use PerlACE::Run_Test;
$status = 0;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ior");
$iorfile_1 = $iorfile."_1";
$iorfile_2 = $iorfile."_2";
@@ -26,34 +26,41 @@ unlink $iorfile_4;
unlink $iorfile_5;
unlink $iorfile_6;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT");
+$SV = new PerlACE::Process ("server");
+$CL1 = new PerlACE::Process ("client",
+ "-a file://$iorfile_1 -b file://$iorfile_2 -c file://$iorfile_3 -d file://$iorfile_4");
+$CL2 = new PerlACE::Process ("client", "-e file://$iorfile_5 -f file://$iorfile_6");
+
+
+$SV->Spawn ();
# In this example all the files are written out at the same time. So make a
# check only for the first file
-if (ACE::waitforfile_timed ($iorfile_1, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile_1, 5) == -1) {
+ print STDERR "ERROR: cannot find ior files\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create ($EXEPREFIX."client$EXE_EXT",
- "-a file://$iorfile_1 -b file://$iorfile_2 -c file://$iorfile_3 -d file://$iorfile_4");
+$client = $CL1->SpawnWaitKill (60);
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
-if (ACE::waitforfile_timed ($iorfile_5,1) == 0) {
- $client = Process::Create ($EXEPREFIX."client$EXE_EXT",
- " -e file://$iorfile_5 -f file://$iorfile_6");
+$client = $CL2->SpawnWaitKill (60);
- if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
+if ($client != 0) {
+ print STDERR "ERROR: client 2 returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
$status = 1;
- $client->Kill (); $client->TimedWait (1);
- }
}
unlink $iorfile_1;
@@ -63,10 +70,4 @@ unlink $iorfile_4;
unlink $iorfile_5;
unlink $iorfile_6;
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: couldn't terminate server nicely\n";
- $status = 1;
- $SV->Kill (); $SV->TimedWait (1);
-}
-
exit $status;
diff --git a/TAO/examples/POA/TIE/server.dsp b/TAO/examples/POA/TIE/server.dsp
index 1d3ea15a9ae..a8c7e7d4fbd 100644
--- a/TAO/examples/POA/TIE/server.dsp
+++ b/TAO/examples/POA/TIE/server.dsp
@@ -37,7 +37,7 @@ RSC=rc.exe
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
+# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""