summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a164
-rwxr-xr-xTAO/examples/Buffered_AMI/run_test.pl45
-rwxr-xr-xTAO/examples/Buffered_Oneways/run_test.pl92
-rw-r--r--TAO/examples/Callback_Quoter/Consumer.dsp2
-rw-r--r--TAO/examples/Callback_Quoter/Notifier.dsp2
-rw-r--r--TAO/examples/Callback_Quoter/Supplier.dsp2
-rwxr-xr-xTAO/examples/Callback_Quoter/run_test.pl95
-rw-r--r--TAO/examples/Load_Balancing/client.dsp2
-rwxr-xr-xTAO/examples/Load_Balancing/run_test.pl32
-rw-r--r--TAO/examples/Load_Balancing/server.dsp2
-rw-r--r--TAO/examples/Load_Balancing/service.dsp2
-rwxr-xr-xTAO/examples/Logging/run_test.pl46
-rwxr-xr-xTAO/examples/OBV/Typed_Events/run_test.pl38
-rwxr-xr-xTAO/examples/POA/Forwarding/run_test.pl3
-rw-r--r--TAO/examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp2
-rw-r--r--TAO/examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp4
-rw-r--r--TAO/examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp4
-rwxr-xr-xTAO/examples/Persistent_Grid/run_test.pl66
-rwxr-xr-xTAO/examples/PluggableUDP/tests/run_test.pl38
-rwxr-xr-xTAO/examples/Simple/bank/run_test.pl38
-rwxr-xr-xTAO/examples/Simple/echo/run_test.pl41
-rwxr-xr-xTAO/examples/Simple/grid/run_test.pl38
-rwxr-xr-xTAO/examples/Simple/time-date/run_test.pl35
-rwxr-xr-xTAO/examples/Simple/time/run_test.pl41
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl89
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Latency/run_test.pl82
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Multicast/run_test.pl106
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl107
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Pluggable/run_test.pl87
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/benchmark/run_test.pl85
-rwxr-xr-xTAO/orbsvcs/tests/CosEvent/Basic/run_test.pl89
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp2
-rwxr-xr-xTAO/orbsvcs/tests/EC_Basic/run_test.pl22
-rw-r--r--TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp4
-rw-r--r--TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp4
-rwxr-xr-xTAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl87
-rwxr-xr-xTAO/orbsvcs/tests/EC_Mcast/run_test.pl51
-rwxr-xr-xTAO/orbsvcs/tests/EC_Multiple/run_test.pl54
-rwxr-xr-xTAO/orbsvcs/tests/EC_Throughput/run_test.pl141
-rwxr-xr-xTAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl88
-rwxr-xr-xTAO/orbsvcs/tests/Event/Basic/run_test.pl204
-rwxr-xr-xTAO/orbsvcs/tests/Event/Performance/run_test.pl112
-rwxr-xr-xTAO/orbsvcs/tests/Event_Latency/run_test.pl69
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/NameService/run_test.pl111
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/run_test.pl507
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl115
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl88
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl119
-rw-r--r--TAO/orbsvcs/tests/Interoperable_Naming/client.dsp2
-rwxr-xr-xTAO/orbsvcs/tests/Interoperable_Naming/run_test.pl78
-rw-r--r--TAO/orbsvcs/tests/LoadBalancing/client.dsp4
-rw-r--r--TAO/orbsvcs/tests/LoadBalancing/server.dsp4
-rwxr-xr-xTAO/orbsvcs/tests/Property/run_test.pl85
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/client.dsp2
-rwxr-xr-xTAO/orbsvcs/tests/Simple_Naming/process-m-output.pl8
-rwxr-xr-xTAO/orbsvcs/tests/Simple_Naming/run_test.pl131
-rwxr-xr-xTAO/orbsvcs/tests/Time/run_test.pl147
-rw-r--r--TAO/orbsvcs/tests/Trading/Colocated_Test.dsp2
-rw-r--r--TAO/orbsvcs/tests/Trading/Export_Test.dsp2
-rw-r--r--TAO/orbsvcs/tests/Trading/Import_Test.dsp2
-rw-r--r--TAO/orbsvcs/tests/Trading/TradingLib.dsp2
-rwxr-xr-xTAO/orbsvcs/tests/Trading/run_test.pl80
-rw-r--r--TAO/tests/AMI/AMI_Test_Client.dsp2
-rw-r--r--TAO/tests/AMI/AMI_Test_Server.dsp2
-rw-r--r--TAO/tests/AMI/AMI_Test_Simple_Client.dsp2
-rwxr-xr-xTAO/tests/AMI/run_test.pl75
-rw-r--r--TAO/tests/AMI_Timeouts/client.dsp2
-rwxr-xr-xTAO/tests/AMI_Timeouts/run_test.pl55
-rw-r--r--TAO/tests/AMI_Timeouts/server.dsp2
-rwxr-xr-xTAO/tests/BiDirectional/run_test.pl43
-rwxr-xr-xTAO/tests/BiDirectional_NestedUpcall/run_test.pl43
-rw-r--r--TAO/tests/CDR/CDR.dsw24
-rw-r--r--TAO/tests/CDR/alignment.dsp91
-rw-r--r--TAO/tests/CDR/allocator.dsp91
-rwxr-xr-xTAO/tests/CDR/run_test.pl45
-rwxr-xr-xTAO/tests/Codec/run_test.pl20
-rwxr-xr-xTAO/tests/Connection_Purging/run_test.pl18
-rwxr-xr-xTAO/tests/DSI_Gateway/run_test.pl84
-rw-r--r--TAO/tests/DynAny_Test/basic_test.dsp2
-rwxr-xr-xTAO/tests/DynAny_Test/run_test.pl72
-rwxr-xr-xTAO/tests/Endpoint_Per_Priority/run_test.pl75
-rwxr-xr-xTAO/tests/Exposed_Policies/run_test.pl21
-rwxr-xr-xTAO/tests/Faults/run_test.pl237
-rwxr-xr-xTAO/tests/Forwarding/run_test.pl80
-rwxr-xr-xTAO/tests/IDL_Test/run_test.pl14
-rwxr-xr-xTAO/tests/IORManipulation/run_test.pl21
-rwxr-xr-xTAO/tests/InterOp-Naming/run_test.pl144
-rwxr-xr-xTAO/tests/Leader_Followers/run_test.pl188
-rwxr-xr-xTAO/tests/LongUpcalls/run_test.pl87
-rwxr-xr-xTAO/tests/LongWrites/run_test.pl52
-rwxr-xr-xTAO/tests/MT_Client/run_test.pl87
-rwxr-xr-xTAO/tests/MT_Server/run_test.pl109
-rw-r--r--TAO/tests/Multiple/Client.dsp2
-rw-r--r--TAO/tests/Multiple/Server.dsp2
-rwxr-xr-xTAO/tests/Multiple/run_test.pl95
-rwxr-xr-xTAO/tests/Multiple_Inheritance/run_test.pl43
-rw-r--r--TAO/tests/Native_Exceptions/client.dsp2
-rwxr-xr-xTAO/tests/Native_Exceptions/run_test.pl48
-rw-r--r--TAO/tests/Native_Exceptions/server.dsp2
-rwxr-xr-xTAO/tests/NestedUpcall/MT_Client_Test/run_test.pl77
-rwxr-xr-xTAO/tests/NestedUpcall/Simple/run_test.pl81
-rwxr-xr-xTAO/tests/NestedUpcall/Triangle_Test/run_test.pl76
-rwxr-xr-xTAO/tests/Nested_Event_Loop/run_test.pl51
-rw-r--r--TAO/tests/ORB_destroy/ORB_destroy.dsp2
-rwxr-xr-xTAO/tests/ORB_destroy/run_test.pl17
-rwxr-xr-xTAO/tests/ORB_init/run_test.pl18
-rw-r--r--TAO/tests/Object_Loader/Test_DLL.dsp4
-rw-r--r--TAO/tests/Object_Loader/driver.dsp2
-rwxr-xr-xTAO/tests/Object_Loader/run_test.pl11
-rwxr-xr-xTAO/tests/OctetSeq/run_test.pl69
-rwxr-xr-xTAO/tests/POA/Deactivation/run_test.pl21
-rwxr-xr-xTAO/tests/POA/Destruction/run_test.pl21
-rwxr-xr-xTAO/tests/POA/Identity/run_test.pl22
-rwxr-xr-xTAO/tests/POA/Non_Servant_Upcalls/run_test.pl21
-rwxr-xr-xTAO/tests/POA/wait_for_completion/run_test.pl21
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl132
-rwxr-xr-xTAO/tests/Param_Test/run_test_dii.pl2
-rwxr-xr-xTAO/tests/Policies/run_test.pl24
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/client.dsp2
-rwxr-xr-xTAO/tests/Portable_Interceptors/Benchmark/run_test.pl51
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/server.dsp2
-rwxr-xr-xTAO/tests/Portable_Interceptors/Dynamic/run_test.pl53
-rwxr-xr-xTAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl63
-rwxr-xr-xTAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl53
-rwxr-xr-xTAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl53
-rwxr-xr-xTAO/tests/RTCORBA/Banded_Connections/run_test.pl65
-rwxr-xr-xTAO/tests/RTCORBA/Client_Propagated/run_test.pl51
-rwxr-xr-xTAO/tests/RTCORBA/Client_Protocol/run_test.pl72
-rwxr-xr-xTAO/tests/RTCORBA/Explicit_Binding/run_test.pl54
-rwxr-xr-xTAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl12
-rwxr-xr-xTAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl106
-rwxr-xr-xTAO/tests/RTCORBA/Private_Connection/run_test.pl56
-rwxr-xr-xTAO/tests/RTCORBA/RTMutex/run_test.pl25
-rwxr-xr-xTAO/tests/RTCORBA/Server_Declared/run_test.pl66
-rwxr-xr-xTAO/tests/RTCORBA/Server_Protocol/run_test.pl106
-rwxr-xr-xTAO/tests/Smart_Proxies/Benchmark/run_test.pl49
-rwxr-xr-xTAO/tests/Smart_Proxies/On_Demand/run_test.pl47
-rwxr-xr-xTAO/tests/Smart_Proxies/Policy/run_test.pl126
-rw-r--r--TAO/tests/Smart_Proxies/client.dsp2
-rwxr-xr-xTAO/tests/Smart_Proxies/run_test.pl44
-rw-r--r--TAO/tests/Smart_Proxies/server.dsp2
-rwxr-xr-xTAO/tests/Timed_Buffered_Oneways/run_test.pl28
-rw-r--r--TAO/tests/Timeout/client.dsp2
-rwxr-xr-xTAO/tests/Timeout/run_test.pl46
-rw-r--r--TAO/tests/Timeout/server.dsp2
-rwxr-xr-xTAO/tests/Xt_Stopwatch/run_test.pl50
-rwxr-xr-xTAO/tests/ior_corbaloc/run_test.pl151
147 files changed, 3929 insertions, 3970 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 32d40cbdd34..10bf6aded16 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,167 @@
+Sun Mar 4 19:12:59 2001 Darrell Brunsch <brunsch@uci.edu>
+
+ * examples/Callback_Quoter/Consumer.dsp:
+ * examples/Callback_Quoter/Notifier.dsp:
+ * examples/Callback_Quoter/Supplier.dsp:
+ * examples/Load_Balancing/client.dsp:
+ * examples/Load_Balancing/server.dsp:
+ * examples/Load_Balancing/service.dsp:
+ * examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp:
+ * examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp:
+ * examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp:
+ * orbsvcs/tests/EC_Basic/EC_Basic.dsp:
+ * orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp:
+ * orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp:
+ * orbsvcs/tests/Interoperable_Naming/client.dsp:
+ * orbsvcs/tests/LoadBalancing/client.dsp:
+ * orbsvcs/tests/LoadBalancing/server.dsp:
+ * orbsvcs/tests/Simple_Naming/client.dsp:
+ * orbsvcs/tests/Trading/Colocated_Test.dsp:
+ * orbsvcs/tests/Trading/Export_Test.dsp:
+ * orbsvcs/tests/Trading/Import_Test.dsp:
+ * orbsvcs/tests/Trading/TradingLib.dsp:
+ * tests/AMI/AMI_Test_Client.dsp:
+ * tests/AMI/AMI_Test_Server.dsp:
+ * tests/AMI/AMI_Test_Simple_Client.dsp:
+ * tests/AMI_Timeouts/client.dsp:
+ * tests/AMI_Timeouts/server.dsp:
+ * tests/DynAny_Test/basic_test.dsp:
+ * tests/Multiple/Client.dsp:
+ * tests/Multiple/Server.dsp:
+ * tests/Native_Exceptions/client.dsp:
+ * tests/ORB_destroy/ORB_destroy.dsp:
+ * tests/Native_Exceptions/server.dsp:
+ * tests/Object_Loader/Test_DLL.dsp:
+ * tests/Object_Loader/driver.dsp:
+ * tests/Portable_Interceptors/Benchmark/client.dsp:
+ * tests/Portable_Interceptors/Benchmark/server.dsp:
+ * tests/Smart_Proxies/client.dsp:
+ * tests/Smart_Proxies/server.dsp:
+ * tests/Timeout/client.dsp:
+ * tests/Timeout/server.dsp:
+
+ Fixed problems with outputting the release executables into
+ the wrong directory.
+
+ * tests/CDR/alignment.dsp: (added)
+ * tests/CDR/allocator.dsp: (added)
+ * tests/CDR/CDR.dsw:
+
+ Added a couple of missing projects.
+
+ * tests/Leader_Followers/run_test.pl:
+ * tests/Leader_Followers/run_test_mt.pl:
+
+ Split the actions of this test into 2 run_tests, so it
+ doesn't hit the sandbox timeout in the nightly builds.
+
+ * examples/Buffered_AMI/run_test.pl:
+ * examples/Buffered_Oneways/run_test.pl:
+ * examples/Callback_Quoter/run_test.pl:
+ * examples/Load_Balancing/run_test.pl:
+ * examples/Logging/run_test.pl:
+ * examples/OBV/Typed_Events/run_test.pl:
+ * examples/PluggableUDP/tests/run_test.pl:
+ * examples/POA/Forwarding/run_test.pl:
+ * examples/Persistent_Grid/run_test.pl:
+ * examples/Simple/bank/run_test.pl:
+ * examples/Simple/echo/run_test.pl:
+ * examples/Simple/grid/run_test.pl:
+ * examples/Simple/time/run_test.pl:
+ * examples/Simple/time-date/run_test.pl:
+ * orbsvcs/tests/AVStreams/Full_Profile/run_test.pl:
+ * orbsvcs/tests/AVStreams/Latency/run_test.pl:
+ * orbsvcs/tests/AVStreams/Multicast/run_test.pl:
+ * orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl:
+ * orbsvcs/tests/AVStreams/Pluggable/run_test.pl:
+ * orbsvcs/tests/AVStreams/benchmark/run_test.pl:
+ * orbsvcs/tests/CosEvent/Basic/run_test.pl:
+ * orbsvcs/tests/EC_Basic/run_test.pl:
+ * orbsvcs/tests/EC_Custom_Marshal/run_test.pl:
+ * orbsvcs/tests/EC_Mcast/run_test.pl:
+ * orbsvcs/tests/EC_Multiple/run_test.pl:
+ * orbsvcs/tests/EC_Throughput/run_test.pl:
+ * orbsvcs/tests/Event/Basic/exhaustive_test.pl:
+ * orbsvcs/tests/Event/Basic/run_test.pl:
+ * orbsvcs/tests/Event/Performance/run_test.pl:
+ * orbsvcs/tests/Event_Latency/run_test.pl:
+ * orbsvcs/tests/ImplRepo/run_test.pl:
+ * orbsvcs/tests/ImplRepo/NameService/run_test.pl:
+ * orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl:
+ * orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl:
+ * orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl:
+ * orbsvcs/tests/Interoperable_Naming/run_test.pl:
+ * orbsvcs/tests/Property/run_test.pl:
+ * orbsvcs/tests/Simple_Naming/process-m-output.pl:
+ * orbsvcs/tests/Simple_Naming/run_test.pl:
+ * orbsvcs/tests/Time/run_test.pl:
+ * orbsvcs/tests/Trading/run_test.pl:
+ * tests/AMI/run_test.pl:
+ * tests/AMI_Timeouts/run_test.pl:
+ * tests/BiDirectional/run_test.pl:
+ * tests/BiDirectional_NestedUpcall/run_test.pl:
+ * tests/CDR/run_test.pl:
+ * tests/Codec/run_test.pl:
+ * tests/Connection_Purging/run_test.pl:
+ * tests/DSI_Gateway/run_test.pl:
+ * tests/DynAny_Test/run_test.pl:
+ * tests/Endpoint_Per_Priority/run_test.pl:
+ * tests/Exposed_Policies/run_test.pl:
+ * tests/Faults/run_test.pl:
+ * tests/Forwarding/run_test.pl:
+ * tests/IDL_Test/run_test.pl:
+ * tests/IORManipulation/run_test.pl:
+ * tests/InterOp-Naming/run_test.pl:
+ * tests/Leader_Followers/run_test.pl:
+ * tests/LongUpcalls/run_test.pl:
+ * tests/LongWrites/run_test.pl:
+ * tests/MT_Client/run_test.pl:
+ * tests/MT_Server/run_test.pl:
+ * tests/Multiple/run_test.pl:
+ * tests/Multiple_Inheritance/run_test.pl:
+ * tests/Native_Exceptions/run_test.pl:
+ * tests/NestedUpcall/MT_Client_Test/run_test.pl:
+ * tests/NestedUpcall/Simple/run_test.pl:
+ * tests/NestedUpcall/Triangle_Test/run_test.pl:
+ * tests/Nested_Event_Loop/run_test.pl:
+ * tests/ORB_destroy/run_test.pl:
+ * tests/ORB_init/run_test.pl:
+ * tests/Object_Loader/run_test.pl:
+ * tests/OctetSeq/run_test.pl:
+ * tests/POA/Deactivation/run_test.pl:
+ * tests/POA/Destruction/run_test.pl:
+ * tests/POA/Identity/run_test.pl:
+ * tests/POA/Non_Servant_Upcalls/run_test.pl:
+ * tests/POA/wait_for_completion/run_test.pl:
+ * tests/Param_Test/run_test.pl:
+ * tests/Param_Test/run_test_dii.pl:
+ * tests/Policies/run_test.pl:
+ * tests/Portable_Interceptors/Benchmark/run_test.pl:
+ * tests/Portable_Interceptors/Dynamic/run_test.pl:
+ * tests/Portable_Interceptors/ForwardRequest/run_test.pl:
+ * tests/Portable_Interceptors/IORInterceptor/run_test.pl:
+ * tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl:
+ * tests/RTCORBA/Banded_Connections/run_test.pl:
+ * tests/RTCORBA/Client_Propagated/run_test.pl:
+ * tests/RTCORBA/Client_Protocol/run_test.pl:
+ * tests/RTCORBA/Explicit_Binding/run_test.pl:
+ * tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl:
+ * tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl:
+ * tests/RTCORBA/Private_Connection/run_test.pl:
+ * tests/RTCORBA/RTMutex/run_test.pl:
+ * tests/RTCORBA/Server_Declared/run_test.pl:
+ * tests/RTCORBA/Server_Protocol/run_test.pl:
+ * tests/Smart_Proxies/run_test.pl:
+ * tests/Smart_Proxies/Benchmark/run_test.pl:
+ * tests/Smart_Proxies/On_Demand/run_test.pl:
+ * tests/Smart_Proxies/Policy/run_test.pl:
+ * tests/Timed_Buffered_Oneways/run_test.pl:
+ * tests/Timeout/run_test.pl:
+ * tests/Xt_Stopwatch/run_test.pl:
+ * tests/ior_corbaloc/run_test.pl:
+
+ Updated to use PerlACE::Run_Test;
+
Sun Mar 04 16:01:50 2001 Ossama Othman <ossama@uci.edu>
* tao/RT_Current.h:
diff --git a/TAO/examples/Buffered_AMI/run_test.pl b/TAO/examples/Buffered_AMI/run_test.pl
index 5b506755320..cc4c782cf58 100755
--- a/TAO/examples/Buffered_AMI/run_test.pl
+++ b/TAO/examples/Buffered_AMI/run_test.pl
@@ -5,39 +5,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$iorfile = PerlACE::LocalFile ("ami.ior");
+
+$status = 0;
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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 ", "-x");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/examples/Buffered_Oneways/run_test.pl b/TAO/examples/Buffered_Oneways/run_test.pl
index 09d036acbf9..ff810f280c4 100755
--- a/TAO/examples/Buffered_Oneways/run_test.pl
+++ b/TAO/examples/Buffered_Oneways/run_test.pl
@@ -5,75 +5,77 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$iorfile = "ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("oneways.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client");
-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;
}
-print STDOUT "\nFlushing based on implicit message counts\n\n";
+print STDERR "\nFlushing based on implicit message counts\n\n";
+
+$CL->Arguments ("-k file://$iorfile -c 5 -b -1 -f -1 -t -1");
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-c 5 -b -1 -f -1 -t -1");
+$client = $CL->SpawnWaitKill (60);
-$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
}
-print STDOUT "\nFlushing based on implicit message bytes\n\n";
+print STDERR "\nFlushing based on implicit message bytes\n\n";
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-b 250 -c -1 -f -1 -t -1");
+$CL->Arguments ("-k file://$iorfile -b 250 -c -1 -f -1 -t -1");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1
}
-print STDOUT "\nFlushing based on implicit timeout\n\n";
+print STDERR "\nFlushing based on implicit timeout\n\n";
+
+$CL->Arguments ("-k file://$iorfile -t 5000 -b -1 -c -1 -f -1");
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-t 5000 -b -1 -c -1 -f -1");
+$client = $CL->SpawnWaitKill (60);
-$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
}
-print STDOUT "\nExplicit queue flushing (and server shutdown)\n\n";
+print STDERR "\nExplicit queue flushing (and server shutdown)\n\n";
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-f 5 -b -1 -c 100 -t -1 -x");
+$CL->Arguments ("-k file://$iorfile -f 5 -b -1 -c 100 -t -1 -x");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
+$client = $CL->SpawnWaitKill (60);
-$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;
+$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/Callback_Quoter/Consumer.dsp b/TAO/examples/Callback_Quoter/Consumer.dsp
index 8abdec0c9b0..33d52dddf85 100644
--- a/TAO/examples/Callback_Quoter/Consumer.dsp
+++ b/TAO/examples/Callback_Quoter/Consumer.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/Callback_Quoter/Notifier.dsp b/TAO/examples/Callback_Quoter/Notifier.dsp
index 41ccd7788df..0256aba7a41 100644
--- a/TAO/examples/Callback_Quoter/Notifier.dsp
+++ b/TAO/examples/Callback_Quoter/Notifier.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/Callback_Quoter/Supplier.dsp b/TAO/examples/Callback_Quoter/Supplier.dsp
index f7e156fab3b..9eda620d3f4 100644
--- a/TAO/examples/Callback_Quoter/Supplier.dsp
+++ b/TAO/examples/Callback_Quoter/Supplier.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/Callback_Quoter/run_test.pl b/TAO/examples/Callback_Quoter/run_test.pl
index aac24db5939..78aeb41bd07 100755
--- a/TAO/examples/Callback_Quoter/run_test.pl
+++ b/TAO/examples/Callback_Quoter/run_test.pl
@@ -5,76 +5,67 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
+use lib '../../../bin';
+use PerlACE::Run_Test;
+
+$status = 0;
+$ns_ior = PerlACE::LocalFile ("NameService.ior");
+$sleeptime = 5;
+
+unlink $ns_ior;
+
+$NS = new PerlACE::Process ("../../orbsvcs/Naming_Service/Naming_Service", "-o $ns_ior");
+$N = new PerlACE::Process ("notifier", "-ORBInitRef NameService=file://$ns_ior");
+$C = new PerlACE::Process ("consumer", "-ORBInitRef NameService=file://$ns_ior -t 12 -a TAO");
+$S = new PerlACE::Process ("supplier", "-ORBInitRef NameService=file://$ns_ior -iexample.stocks");
print STDERR "================ Remote test\n";
-$ns_ior = "NameService.ior";
+$NS->Spawn ();
-unlink $ns_ior;
-$NS = Process::Create ("..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "orbsvcs".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT,
- " -o $ns_ior ");
-
-if (ACE::waitforfile_timed ($ns_ior, 5) == -1) {
- print STDERR "ERROR: cannot find file <$ns_ior>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($ns_ior, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$ns_ior>\n";
+ $NS->Kill ();
+ exit 1;
}
-$N = Process::Create (".".$DIR_SEPARATOR.
- "notifier".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior ");
-sleep 5;
+$N->Spawn ();
-$C = Process::Create (".".$DIR_SEPARATOR.
- "consumer".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior "
- . " -t 12 -a TAO");
+sleep $sleeptime;
-sleep 5;
+$C->Spawn ();
-$S = Process::Create (".".$DIR_SEPARATOR.
- "supplier".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior "
- . " -iexample.stocks");
+sleep $sleeptime;
-if ($S->TimedWait (60) == -1) {
- print STDERR "ERROR: supplier timedout\n";
- $S->Kill (); $S->TimedWait (1);
- $C->Kill (); $C->TimedWait (1);
- $N->Kill (); $N->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$supplier = $S->SpawnWaitKill (60);
+
+if ($supplier != 0) {
+ print STDERR "ERROR: supplier returned $supplier\n";
+ $status = 1;
}
-$C->Terminate (); if ($C->TimedWait (5) == -1) {
- print STDERR "ERROR: consumer timedout\n";
- $C->Kill (); $C->TimedWait (1);
- $N->Kill (); $N->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $C->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: consumer returned $server\n";
+ $status = 1;
}
-$N->Terminate (); if ($N->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate notifier\n";
- $N->Kill (); $N->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $N->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: notifier returned $server\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $NS->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: naming service returned $server\n";
+ $status = 1;
}
unlink $ns_ior;
-exit 0;
+exit $status;
diff --git a/TAO/examples/Load_Balancing/client.dsp b/TAO/examples/Load_Balancing/client.dsp
index a4a7fd130fe..77a91590c20 100644
--- a/TAO/examples/Load_Balancing/client.dsp
+++ b/TAO/examples/Load_Balancing/client.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
!ELSEIF "$(CFG)" == "Load_Balancing client - Win32 Debug"
diff --git a/TAO/examples/Load_Balancing/run_test.pl b/TAO/examples/Load_Balancing/run_test.pl
index 9d8e313225a..724a1de22e1 100755
--- a/TAO/examples/Load_Balancing/run_test.pl
+++ b/TAO/examples/Load_Balancing/run_test.pl
@@ -48,9 +48,9 @@ sleep ($sleeptime);
print STDERR "\n Client using Round Robin Object Group (10 iterations): \n\n";
$client = $CL->SpawnWaitKill (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill ();
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
$CL->Arguments ("-r " . $CL->Arguments ());
@@ -58,15 +58,25 @@ $CL->Arguments ("-r " . $CL->Arguments ());
print STDERR "\n Client using Random Object Group (10 iterations): \n\n";
$client = $CL->SpawnWaitKill (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill ();
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-
# Clean up.
-$LB->Kill ();
-$SV->Kill ();
+$loadbalancer= $LB->TerminateWaitKill (5);
+
+if ($loadbalancer != 0) {
+ print STDERR "ERROR: load balancer returned $loadbalancer\n";
+ $status = 1;
+}
+
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+unlink $iorfile;
-# @@ Capture any exit status from the processes.
-exit 0;
+exit $status;
diff --git a/TAO/examples/Load_Balancing/server.dsp b/TAO/examples/Load_Balancing/server.dsp
index bbff4ad3e3b..0351494d51c 100644
--- a/TAO/examples/Load_Balancing/server.dsp
+++ b/TAO/examples/Load_Balancing/server.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
!ELSEIF "$(CFG)" == "Load_Balancing server - Win32 Debug"
diff --git a/TAO/examples/Load_Balancing/service.dsp b/TAO/examples/Load_Balancing/service.dsp
index 5f8bb7880de..ffa34d25c49 100644
--- a/TAO/examples/Load_Balancing/service.dsp
+++ b/TAO/examples/Load_Balancing/service.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"load_balancer.exe" /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release/load_balancer.exe" /libpath:"../../../ace" /libpath:"../../tao" /libpath:"../../tao/PortableServer"
!ELSEIF "$(CFG)" == "Load_Balancing service - Win32 Debug"
diff --git a/TAO/examples/Logging/run_test.pl b/TAO/examples/Logging/run_test.pl
index 891abc3421f..58aac5eaaed 100755
--- a/TAO/examples/Logging/run_test.pl
+++ b/TAO/examples/Logging/run_test.pl
@@ -7,41 +7,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs the Logger client and server
-unshift @INC, '../../../bin';
-require Process;
+use lib '../../../bin';
+use PerlACE::Run_Test;
+
+$status = 0;
# amount of delay between running the servers
$sleeptime = 7;
-# Starts the Logging Service
-sub service
-{
- my $args = "";
- my $prog = $EXEPREFIX."Logging_Service"
- .$EXE_EXT;
- $SV = Process::Create ($prog, $args);
-}
-
-# Starts the test client
-sub test
-{
- my $args = "";
- my $prog = $EXEPREFIX."Logging_Test".$EXE_EXT;
-
- system ("$prog $args");
-}
+$SV = new PerlACE::Process ("Logging_Service");
+$CL = new PerlACE::Process ("Logging_Test");
# Start the service
-service ();
+$SV->Spawn ();
# Give the service time to settle
sleep $sleeptime;
-# Start the client (which exits automatically)
-test ();
+# Start the client
+$client = $CL->SpawnWaitKill (60);
-# Give the client time to log and exit
-sleep 3;
+if ($client != 0) {
+ print STDERR "ERROR: test returned $client\n";
+ $status = 1;
+}
# Kill the service
-$SV->Kill ();
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: service returned $server\n";
+ $status = 1;
+}
+
+exit $status;
diff --git a/TAO/examples/OBV/Typed_Events/run_test.pl b/TAO/examples/OBV/Typed_Events/run_test.pl
index 6d9847d5a80..3a125c5703c 100755
--- a/TAO/examples/OBV/Typed_Events/run_test.pl
+++ b/TAO/examples/OBV/Typed_Events/run_test.pl
@@ -6,33 +6,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
+
$status = 0;
-$iorfile = "obv.ior";
+$iorfile = PerlACE::LocalFile ("obv.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile ");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: timed out waiting for file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create($EXEPREFIX."client$EXE_EXT","-f $iorfile");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: the client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: the client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/examples/POA/Forwarding/run_test.pl b/TAO/examples/POA/Forwarding/run_test.pl
index 79d038794be..6e0a37f8879 100755
--- a/TAO/examples/POA/Forwarding/run_test.pl
+++ b/TAO/examples/POA/Forwarding/run_test.pl
@@ -8,9 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "../../../../bin";
use PerlACE::Run_Test;
-# Set STDERR to autoflush (weird unbuffered output stuff)
-$| = 1;
-
# Make pretty look thing
print STDERR "\n";
diff --git a/TAO/examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp b/TAO/examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp
index 1e90bc2fe9a..20e3264b259 100644
--- a/TAO/examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp
+++ b/TAO/examples/Persistent_Grid/Persistent_Grid_Client_Files.dsp
@@ -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 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib /nologo /subsystem:console /machine:I386 /out:"Release/client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
!ELSEIF "$(CFG)" == "Persistent Grid Client - Win32 Debug"
diff --git a/TAO/examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp b/TAO/examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp
index b29309fe2fe..042bdf7739f 100644
--- a/TAO/examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp
+++ b/TAO/examples/Persistent_Grid/Persistent_Grid_Second_Client_Files.dsp
@@ -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 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib /nologo /subsystem:console /machine:I386 /out:"Release/persistent_client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
!ELSEIF "$(CFG)" == "Persistent Grid Second Client - Win32 Debug"
@@ -76,7 +76,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 /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib TAOd.lib TAO_PortableServerd.lib TAO_CosNamingd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
+# ADD LINK32 aced.lib TAOd.lib TAO_PortableServerd.lib TAO_CosNamingd.lib /nologo /subsystem:console /debug /machine:I386 /out:"persistent_client.exe" /pdbtype:sept /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
!ENDIF
diff --git a/TAO/examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp b/TAO/examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp
index 1bfc034eb96..b88be173bf5 100644
--- a/TAO/examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp
+++ b/TAO/examples/Persistent_Grid/Persistent_Grid_Server_Files.dsp
@@ -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 TAO_CosNaming.lib ace.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
+# ADD LINK32 TAO.lib TAO_CosNaming.lib ace.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release/server.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
!ELSEIF "$(CFG)" == "Persistent Grid Server - Win32 Debug"
@@ -76,7 +76,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 /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAOd.lib TAO_CosNamingd.lib aced.lib TAO_PortableServerd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
+# ADD LINK32 TAOd.lib TAO_CosNamingd.lib aced.lib TAO_PortableServerd.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace" /libpath:"..\..\orbsvcs\orbsvcs"
!ENDIF
diff --git a/TAO/examples/Persistent_Grid/run_test.pl b/TAO/examples/Persistent_Grid/run_test.pl
index 91ac2ec3544..eda66975a42 100755
--- a/TAO/examples/Persistent_Grid/run_test.pl
+++ b/TAO/examples/Persistent_Grid/run_test.pl
@@ -6,49 +6,63 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
-$iorfile = "grid.ior";
-$mem = "foo";
+$iorfile = PerlACE::LocalFile ("grid.ior");
+$mem = PerlACE::LocalFile ("foo");
+$status = 0;
-$SV = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-o $iorfile -m $mem");
+$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");
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$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$Process::EXE_EXT -k file://$iorfile ");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimeWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Kill (); $SV->TimedWait (1);
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
unlink $iorfile;
-$server = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-o $iorfile -m $mem");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $server->Kill (); $server->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: Could not find file <$iorfile>\n";
+ $server->Kill ();
+ exit 1;
}
-$per_client = Process::Create ($EXEPREFIX."persistent_client$Process::EXE_EXT -k file://$iorfile -w 10 -h 10");
+$pclient = $PCL->SpawnWaitKill (60);
-if ($per_client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $perclient->Kill (); $per_client->TimeWait (1);
+if ($pclient != 0) {
+ print STDERR "ERROR: persistent client returned $pclient\n";
+ $status = 1;
}
-$server->Kill (); $server->TimedWait (1);
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
unlink $iorfile;
unlink $mem;
+
exit $status;
diff --git a/TAO/examples/PluggableUDP/tests/run_test.pl b/TAO/examples/PluggableUDP/tests/run_test.pl
index ad0e449ca59..41ca7f667f9 100755
--- a/TAO/examples/PluggableUDP/tests/run_test.pl
+++ b/TAO/examples/PluggableUDP/tests/run_test.pl
@@ -5,32 +5,34 @@ 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 = "time.ior";
+$iorfile = PerlACE::LocalFile ("time.ior");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile -ORBendpoint diop://:12345");
+$SV = new PerlACE::Process ("server", "-o $iorfile -ORBendpoint diop://:12345");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -t 10 -i 1000");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create ($EXEPREFIX."client$EXE_EXT", "-k file://$iorfile -t 10 -i 1000");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimeWait (1);
+$client = $CL->SpawnWaitKill (60);
+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 (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/examples/Simple/bank/run_test.pl b/TAO/examples/Simple/bank/run_test.pl
index 306d5b0a25d..ad99091c941 100755
--- a/TAO/examples/Simple/bank/run_test.pl
+++ b/TAO/examples/Simple/bank/run_test.pl
@@ -6,33 +6,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
+
$status = 0;
-$iorfile = "bank.ior";
+$iorfile = PerlACE::LocalFile ("bank.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile ");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: Could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create($EXEPREFIX."client$EXE_EXT","-f $iorfile");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: the client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/examples/Simple/echo/run_test.pl b/TAO/examples/Simple/echo/run_test.pl
index 3be6c7823be..f8a88e36242 100755
--- a/TAO/examples/Simple/echo/run_test.pl
+++ b/TAO/examples/Simple/echo/run_test.pl
@@ -6,34 +6,39 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
$status = 0;
-$iorfile = "echo.ior";
+$iorfile = PerlACE::LocalFile ("echo.ior");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile ");
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+unlink $iorfile;
-$client = Process::Create($EXEPREFIX."client$EXE_EXT", "-f $iorfile -x");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile -x");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimedWait (1);
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: Could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
unlink $iorfile;
exit $status;
+
diff --git a/TAO/examples/Simple/grid/run_test.pl b/TAO/examples/Simple/grid/run_test.pl
index 31d1ba57a89..949f8b42585 100755
--- a/TAO/examples/Simple/grid/run_test.pl
+++ b/TAO/examples/Simple/grid/run_test.pl
@@ -6,32 +6,36 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
$status = 0;
-$iorfile = "grid.ior";
+$iorfile = PerlACE::LocalFile ("grid.ior");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile ");
+unlink $iorfile;
+
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile -x -w 12 -h 12 -p 2 -q 2 -v 2345");
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: Could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create($EXEPREFIX."client$EXE_EXT", "-f $iorfile -x -w 12 -h 12 -p 2 -q 2 -v 2345");
+$client = $CL->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 returned $client\n";
+ $status = 1;
}
-if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/examples/Simple/time-date/run_test.pl b/TAO/examples/Simple/time-date/run_test.pl
index 526149fba11..038a97933a2 100755
--- a/TAO/examples/Simple/time-date/run_test.pl
+++ b/TAO/examples/Simple/time-date/run_test.pl
@@ -6,37 +6,34 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
$status = 0;
-$iorfile = "./ior";
+$iorfile = PerlACE::LocalFile ("timedate.ior");
+$conf = PerlACE::LocalFile ("client.conf");
# Remove the file before starting the test.
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "");
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client", "-f $iorfile -ORBSvcConf $conf");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: waiting for file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT",
- "-f $iorfile -ORBSvcConf client.conf");
+$client = $CL->SpawnWaitKill (60);
-if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate the server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
-}
+$SV->Kill ();
unlink $iorfile;
diff --git a/TAO/examples/Simple/time/run_test.pl b/TAO/examples/Simple/time/run_test.pl
index 1f9a7b4b9f4..2001e9c85e4 100755
--- a/TAO/examples/Simple/time/run_test.pl
+++ b/TAO/examples/Simple/time/run_test.pl
@@ -5,32 +5,37 @@ 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 = "time.ior";
+$iorfile = PerlACE::LocalFile ("time.ior");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile ");
+unlink $iorfile;
+
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile -x");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: timedout waiting for file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: Could not find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client = Process::Create ($EXEPREFIX."client$EXE_EXT", "-f $iorfile -x");
-if ($client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $client->Kill (); $client->TimeWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+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 (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
index 87e30116dca..9c507bb244c 100755
--- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
@@ -5,83 +5,64 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-local $nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-
-ACE::checkForTarget($cwd);
-
-$name_server_prog = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."Naming_Service".$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
-$full_profile_server= $EXEPREFIX.".".$DIR_SEPARATOR."server".$EXE_EXT;
-$full_profile_ftp = $EXEPREFIX.".".$DIR_SEPARATOR."ftp".$EXE_EXT;
-
-# variables for parameters
-
-sub name_server
-{
- my $args = "-o $nsior";
- print ("\n$name_server_prog $args\n");
- unlink $nsior;
- $NS = Process::Create ($name_server_prog, $args);
- if (ACE::waitforfile_timed ($nsior, 8) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
+$nsior = PerlACE::LocalFile ("ns.ior");
+$testfile = PerlACE::LocalFile ("test");
+$makefile = PerlACE::LocalFile ("Makefile");
-sub server
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test";
- print ("\nFull_Profile Server: $args\n");
- $SV = Process::Create ($full_profile_server, $args);
-}
+unlink $nsior;
+
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
+$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $testfile");
+$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -f $makefile");
+print STDERR "Starting Naming Service\n";
-sub ftp
-{
- my $args = "-ORBInitRef NameService=file://$nsior"." -f Makefile";
- print ("\nFull_Profile Ftp: $args\n");
- $CL = Process::Create ($full_profile_ftp, $args);
+$NS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server\n";
-server ();
+$SV->Spawn ();
sleep $sleeptime;
-ftp ();
+print STDERR "Starting Client\n";
+$client = $CL->SpawnWaitKill (60);
-if ($CL->TimedWait (100) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
+$nserver = $NS->TerminateWaitKill (5);
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+if ($nserver != 0) {
+ print STDERR "ERROR: Naming Service returned $nserver\n";
+ $status = 1;
}
+unlink $nsior;
+unlink $testfile;
exit $status;
diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
index afc34738296..c98f2d1ab38 100755
--- a/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
@@ -5,71 +5,65 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
-$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$pingior = PerlACE::LocalFile ("ping.ior");
+$pongior = PerlACE::LocalFile ("pong.ior");
-$latency_ping= $EXEPREFIX.".".$DIR_SEPARATOR."ping".$EXE_EXT;
-$latency_pong = $EXEPREFIX.".".$DIR_SEPARATOR."pong".$EXE_EXT;
-$latency_control = $EXEPREFIX.".".$DIR_SEPARATOR."control".$EXE_EXT;
+unlink $pingior, $pongior;
+$PING = new PerlACE::Process ("ping", "-o $pingior");
+$PONG = new PerlACE::Process ("pong", "-o $pongior");
+$CTRL = new PerlACE::Process ("control", "-f file://$pingior -g file://$pongior");
-# variables for parameters
-
-sub ping
-{
- my $args = " -o ping_ior";
- print ("\nPing: $args\n");
- $SV = Process::Create ($latency_ping, $args);
-}
+print STDERR "Starting Ping\n";
+$PING->Spawn ();
-sub pong
-{
- my $args = " -o pong_ior";
- print ("\nPong: $args\n");
- $CL = Process::Create ($latency_pong, $args);
-}
+if (PerlACE::waitforfile_timed ($pingior, 20) == -1) {
+ print STDERR "ERROR: cannot find file <$pingior>\n";
+ $PING->Kill ();
+ exit 1;
+}
+print STDERR "Starting Pong\n";
-sub control
-{
- my $args = " -f file://ping_ior -g file://pong_ior";
- print ("\nControl: $args\n");
- $CO = Process::Create ($latency_control, $args);
+$PONG->Spawn ();
+if (PerlACE::waitforfile_timed ($pongior, 20) == -1) {
+ print STDERR "ERROR: cannot find file <$pongior>\n";
+ $PING->Kill ();
+ $PONG->Kill ();
+ exit 1;
}
-ping ();
+print STDERR "Starting Control\n";
-sleep $sleeptime;
+$control = $CTRL->SpawnWaitKill (200);
-pong ();
+if ($control != 0) {
+ print STDERR "ERROR: control returned $control\n";
+ $status = 1;
+}
-sleep $sleeptime;
+$pi = $PING->TerminateWaitKill (5);
-control ();
+if ($pi != 0) {
+ print STDERR "ERROR: ping returned $pi\n";
+ $status = 1;
+}
+$po = $PONG->TerminateWaitKill (5);
-if ($CL->TimedWait (200) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+if ($po != 0) {
+ print STDERR "ERROR: pong returned $po\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $CO->Kill (); $CO->TimedWait (1);
- exit 1;
-}
+unlink $pingior, $pongior;
exit $status;
diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Multicast/run_test.pl
index 5b68b857dfa..c168a476ea7 100755
--- a/TAO/orbsvcs/tests/AVStreams/Multicast/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Multicast/run_test.pl
@@ -5,98 +5,78 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-local $nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-ACE::checkForTarget($cwd);
+$nsior = PerlACE::LocalFile ("ns.ior");
+$test1 = PerlACE::LocalFile ("test1");
+$test2 = PerlACE::LocalFile ("test2");
+$makefile = PerlACE::LocalFile ("Makefile");
-$name_server_prog = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."Naming_Service".$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
-$multicast_server= $EXEPREFIX.".".$DIR_SEPARATOR."server".$EXE_EXT;
-$multicast_ftp= $EXEPREFIX.".".$DIR_SEPARATOR."ftp".$EXE_EXT;
+unlink $nsior, $test1, $test2;
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
+$SV1 = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $test1");
+$SV2 = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $test2");
+$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -f $makefile");
-# variables for parameters
+print STDERR "Starting Naming Service\n";
-sub name_server
-{
- my $args = "-o $nsior";
- print ("\n$name_server_prog $args\n");
- unlink $nsior;
- $NS = Process::Create ($name_server_prog, $args);
- if (ACE::waitforfile_timed ($nsior, 8) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
-
-sub server1
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test";
- print ("\nPluggable Server: $args\n");
- $SVA = Process::Create ($multicast_server, $args);
-}
-
-sub server2
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test1";
- print ("\nPluggable Server: $args\n");
- $SVB = Process::Create ($multicast_server, $args);
-}
+$NS->Spawn ();
-sub ftp
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f Makefile";
- print ("\nPluggable Ftp: $args\n");
- $CL = Process::Create ($multicast_ftp, $args);
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server 1\n";
-server1 ();
+$SV1->Spawn ();
sleep $sleeptime;
-server2 ();
+print STDERR "Starting Server 2\n";
+
+$SV2->Spawn ();
sleep $sleeptime;
-ftp ();
+print STDERR "Starting Client\n";
+
+$client = $CL->SpawnWaitKill (60);
-if ($CL->TimedWait (300) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
+$server = $SV1->TerminateWaitKill (5);
-$SVA->Terminate (); if ($SVA->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SVA->Kill (); $SVA->TimedWait (1);
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server 1 returned $server\n";
+ $status = 1;
}
-$SVB->Terminate (); if ($SVB->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SVB->Kill (); $SVB->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $SV2->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server 2 returned $server\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: Naming Service returned $nserver\n";
+ $status = 1;
}
+unlink $nsior, $test1, $test2;
exit $status;
diff --git a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl
index 0d0d07ffd99..c168a476ea7 100755
--- a/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl
@@ -5,97 +5,78 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-local $nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-ACE::checkForTarget($cwd);
+$nsior = PerlACE::LocalFile ("ns.ior");
+$test1 = PerlACE::LocalFile ("test1");
+$test2 = PerlACE::LocalFile ("test2");
+$makefile = PerlACE::LocalFile ("Makefile");
-$name_server_prog = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."Naming_Service".$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
-$multicast_full_profile_server= $EXEPREFIX.".".$DIR_SEPARATOR."server".$EXE_EXT;
-$multicast_full_profile_ftp= $EXEPREFIX.".".$DIR_SEPARATOR."ftp".$EXE_EXT;
+unlink $nsior, $test1, $test2;
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
+$SV1 = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $test1");
+$SV2 = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $test2");
+$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -f $makefile");
-# variables for parameters
+print STDERR "Starting Naming Service\n";
-sub name_server
-{
- my $args = "-o $nsior";
- print ("\n$name_server_prog $args\n");
- unlink $nsior;
- $NS = Process::Create ($name_server_prog, $args);
- if (ACE::waitforfile_timed ($nsior, 8) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
-
-sub server1
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test";
- print ("\nPluggable Server: $args\n");
- $SVA = Process::Create ($multicast_full_profile_server, $args);
-}
-
-sub server2
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test1";
- print ("\nPluggable Server: $args\n");
- $SVB = Process::Create ($multicast_full_profile_server, $args);
-}
+$NS->Spawn ();
-sub ftp
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f Makefile";
- print ("\nPluggable Ftp: $args\n");
- $CL = Process::Create ($multicast_full_profile_ftp, $args);
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server 1\n";
-server1 ();
+$SV1->Spawn ();
sleep $sleeptime;
-server2 ();
+print STDERR "Starting Server 2\n";
+
+$SV2->Spawn ();
sleep $sleeptime;
-ftp ();
+print STDERR "Starting Client\n";
+
+$client = $CL->SpawnWaitKill (60);
-if ($CL->TimedWait (100) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SVA->Terminate (); if ($SVA->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SVA->Kill (); $SVA->TimedWait (1);
- exit 1;
+$server = $SV1->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server 1 returned $server\n";
+ $status = 1;
}
-$SVB->Terminate (); if ($SVB->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SVB->Kill (); $SVB->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $SV2->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server 2 returned $server\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: Naming Service returned $nserver\n";
+ $status = 1;
}
+unlink $nsior, $test1, $test2;
exit $status;
diff --git a/TAO/orbsvcs/tests/AVStreams/Pluggable/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Pluggable/run_test.pl
index b50e3999f27..9c507bb244c 100755
--- a/TAO/orbsvcs/tests/AVStreams/Pluggable/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Pluggable/run_test.pl
@@ -5,83 +5,64 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-local $nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-ACE::checkForTarget($cwd);
+$nsior = PerlACE::LocalFile ("ns.ior");
+$testfile = PerlACE::LocalFile ("test");
+$makefile = PerlACE::LocalFile ("Makefile");
-$name_server_prog = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."Naming_Service".$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
-$pluggable_server= $EXEPREFIX.".".$DIR_SEPARATOR."server".$EXE_EXT;
-$pluggable_ftp = $EXEPREFIX.".".$DIR_SEPARATOR."ftp".$EXE_EXT;
+unlink $nsior;
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
+$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f $testfile");
+$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -f $makefile");
-# variables for parameters
-
-sub name_server
-{
- my $args = "-o $nsior";
- print ("\n$name_server_prog $args\n");
- unlink $nsior;
- $NS = Process::Create ($name_server_prog, $args);
- if (ACE::waitforfile_timed ($nsior, 8) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
-
-sub server
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f test";
- print ("\nPluggable Server: $args\n");
- $SV = Process::Create ($pluggable_server, $args);
-}
+print STDERR "Starting Naming Service\n";
+$NS->Spawn ();
-sub ftp
-{
- my $args = " -ORBInitRef NameService=file://$nsior"." -f Makefile";
- print ("\nPluggable Ftp: $args\n");
- $CL = Process::Create ($pluggable_ftp, $args);
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server\n";
-server ();
+$SV->Spawn ();
sleep $sleeptime;
-ftp ();
+print STDERR "Starting Client\n";
-if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
-}
+$client = $CL->SpawnWaitKill (60);
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+$nserver = $NS->TerminateWaitKill (5);
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+if ($nserver != 0) {
+ print STDERR "ERROR: Naming Service returned $nserver\n";
+ $status = 1;
}
+unlink $nsior;
+unlink $testfile;
exit $status;
diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/run_test.pl b/TAO/orbsvcs/tests/AVStreams/benchmark/run_test.pl
index aa256319e5f..16d49a6d962 100755
--- a/TAO/orbsvcs/tests/AVStreams/benchmark/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/benchmark/run_test.pl
@@ -5,80 +5,61 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-$cwd = getcwd();
-local $nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-ACE::checkForTarget($cwd);
+$nsior = PerlACE::LocalFile ("ns.ior");
-$name_server_prog = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR."Naming_Service".$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
-$server_prog = $EXEPREFIX.".".$DIR_SEPARATOR."server".$EXE_EXT;
-$client_prog = $EXEPREFIX.".".$DIR_SEPARATOR."client".$EXE_EXT;
+unlink $nsior;
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior");
+$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior");
+$CL = new PerlACE::Process ("client", "-ORBInitRef NameService=file://$nsior");
-# variables for parameters
-
-sub name_server
-{
- my $args = "-o $nsior";
- print ("\n$name_server_prog $args\n");
- $NS = Process::Create ($name_server_prog, $args);
- if (ACE::waitforfile_timed ($nsior, 5) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
-
-
-sub server
-{
- my $args = "-ORBInitRef NameService=file://$nsior";
- print ("\nServer: $args\n");
- $SV = Process::Create ($server_prog, $args);
-}
+print STDERR "Starting Naming Service\n";
+$NS->Spawn ();
-sub client
-{
- my $args = "-ORBInitRef NameService=file://$nsior";
- print ("\nclient: $args\n");
- $CL = Process::Create ($client_prog, $args);
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server\n";
-server ();
+$SV->Spawn ();
sleep $sleeptime;
-client ();
+print STDERR "Starting Client\n";
-if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: Naming Service returned $nserver\n";
+ $status = 1;
}
+unlink $nsior;
+
exit $status;
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
index 5f283075222..2f5ff8af44c 100755
--- a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
@@ -8,64 +8,53 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs the client and all the other servers that
# are needed
-unshift @INC, '../../../../../bin';
-require ACEutils;
-require Process;
-require Uniqueid;
-use Cwd;
-
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
$status = 0;
-print STDERR "\n\nShutdown EC with clients still attached\n";
-$T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT);
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+$svc_pull_conf = PerlACE::LocalFile ("svc.pull.conf");
-print STDERR "\n\nDisconnect callbacks test\n";
-$T = Process::Create ($EXEPREFIX . "Disconnect".$EXE_EXT);
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+sub RunTest ($$$)
+{
+ my $message = shift;
+ my $program = shift;
+ my $arguments = shift;
-print STDERR "\n\nMT Disconnects test\n";
-$T = Process::Create ($EXEPREFIX . "MT_Disconnect".$EXE_EXT);
-if ($T->TimedWait (240) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+ my $TEST = new PerlACE::Process ($program, $arguments);
-print STDERR "\n\nPush Events\n";
-$T = Process::Create ($EXEPREFIX . "Push_Event".$EXE_EXT);
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+ print STDERR "\n\n$message\n";
+
+ my $test = $TEST->SpawnWaitKill (240);
-print STDERR "\n\nPull-Push Events\n";
-$T = Process::Create ($EXEPREFIX . "Pull_Push_Event".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.pull.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
+ if ($test != 0) {
+ print STDERR "ERROR: Test returned $test\n";
+ $status = 1;
+ }
}
-print STDERR "\n\nRandom\n";
-$T = Process::Create ($EXEPREFIX . "Random".$EXE_EXT);
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("\n\nShutdown EC with clients still attached\n",
+ "Shutdown",
+ "");
+
+RunTest ("\n\nDisconnect callbacks test\n",
+ "Disconnect",
+ "");
+
+RunTest ("\n\nMT Disconnects test\n",
+ "MT_Disconnect",
+ "");
+
+RunTest ("\n\nPush Events\n",
+ "Push_Event",
+ "");
+
+RunTest ("\n\nPull-Push Events\n",
+ "Pull_Push_Event",
+ "-ORBSvcConf $svc_pull_conf");
+
+RunTest ("\n\nRandom\n",
+ "Random",
+ "");
exit $status;
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
index 54bb00d62e2..233a44619a1 100644
--- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.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/orbsvcs/tests/EC_Basic/run_test.pl b/TAO/orbsvcs/tests/EC_Basic/run_test.pl
index 57fe34b5352..c51f890d4fc 100755
--- a/TAO/orbsvcs/tests/EC_Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Basic/run_test.pl
@@ -5,22 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-require Process;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$status = 0;
+$T = new PerlACE::Process ("EC_Basic");
-ACE::checkForTarget(getcwd());
+$test = $T->SpawnWaitKill (60);
-$TEST = Process::Create ($EXEPREFIX."EC_Basic".$EXE_EXT, "");
-
-if ($TEST->TimedWait (60) == -1) {
- print STDERR "ERROR: test timedout\n";
- $status = 1;
- $TEST->Kill (); $TEST->TimedWait (1);
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
-# @@ Capture any errors from the server too.
-exit $status;
+exit 0;
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp
index 9b9968b742a..9db095948d9 100644
--- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.dsp
+++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Consumer.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 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib /nologo /subsystem:console /machine:I386 /out:"ECM_Consumer.exe" /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib /nologo /subsystem:console /machine:I386 /out:"Release/ECM_Consumer.exe" /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
!ELSEIF "$(CFG)" == "ECCM_Consumer - Win32 Debug"
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp
index 8de39935bcd..61fefe6eed5 100644
--- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.dsp
+++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECCM_Supplier.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 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib /nologo /subsystem:console /machine:I386 /out:"ECM_Supplier.exe" /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib TAO_CosNaming.lib TAO_RTEvent.lib TAO_RTSched.lib TAO_Svc_Utils.lib /nologo /subsystem:console /machine:I386 /out:"Release/ECM_Supplier.exe" /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
!ELSEIF "$(CFG)" == "ECCM_Supplier - Win32 Debug"
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
index 5f78d78fb71..e86186b36e8 100755
--- a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl
@@ -5,69 +5,70 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-require Process;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$port = ACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$port = PerlACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0
-$NS_ior = "$cwd$DIR_SEPARATOR" . "NameService.ior";
+$NS_ior = PerlACE::LocalFile ("NameService.ior");
$sleeptime = 5;
$status = 0;
-$NS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT,
- "-ORBNameServicePort $port -o $NS_ior ");
-
-if (ACE::waitforfile_timed ($NS_ior, 5) == -1) {
- print STDERR "ERROR: waiting for naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service",
+ "-ORBNameServicePort $port -o $NS_ior");
+$ES = new PerlACE::Process ("../../Event_Service/Event_Service",
+ "-ORBInitRef NameService=file://$NS_ior -t new");
+$C = new PerlACE::Process ("ECM_Consumer",
+ "-ORBInitRef NameService=file://$NS_ior");
+$S = new PerlACE::Process ("ECM_Supplier",
+ "-ORBInitRef NameService=file://$NS_ior");
+
+$NS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($NS_ior, 5) == -1) {
+ print STDERR "ERROR: waiting for naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-$ES = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Event_Service".$DIR_SEPARATOR.
- "Event_Service".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior -t new");
+$ES->Spawn ();
sleep $sleeptime;
-$C = Process::Create ($EXEPREFIX."ECM_Consumer".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior");
+$C->Spawn ();
sleep $sleeptime;
-$S = Process::Create ($EXEPREFIX."ECM_Supplier".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior");
+$S->Spawn ();
+
+$consumer = $C->WaitKill (60);
-if ($C->TimedWait (60) == -1) {
- $status = 1;
- print STDERR "ERROR: consumer timedout\n";
- $C->Kill (); $C->TimedWait (1);
+if ($consumer != 0) {
+ print STDERR "ERROR: consumer returned $consumer\n";
+ $status = 1;
}
-if ($S->TimedWait (60) == -1) {
- $status =1;
- print STDERR "ERROR: supplier timedout\n";
- $S->Kill (); $S->TimedWait (1);
+$supplier = $S->WaitKill (60);
+
+if ($supplier == -1) {
+ print STDERR "ERROR: supplier returned $supplier\n";
+ $status = 1;
}
-$NS->Terminate();
-$ES->Terminate();
-if ($NS->TimedWait (5) == -1 || $ES->TimedWait (5) == -1) {
- print STDERR "ERROR: couldn't terminate the services nicely\n";
- $NS->Kill (); $NS->TimedWait (1);
- $ES->Kill (); $ES->TimedWait (1);
- $status = 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: nameserver returned $nserver\n";
+ $status = 1;
+}
+
+$eserver = $ES->TerminateWaitKill (5);
+
+if ($eserver != 0) {
+ print STDERR "ERROR: eventserver returned $eserver\n";
+ $status = 1;
}
unlink $NS_ior;
-# @@ Capture the errors from the processes.
exit $status;
diff --git a/TAO/orbsvcs/tests/EC_Mcast/run_test.pl b/TAO/orbsvcs/tests/EC_Mcast/run_test.pl
index 9af67926b84..443a19d3e24 100755
--- a/TAO/orbsvcs/tests/EC_Mcast/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Mcast/run_test.pl
@@ -5,34 +5,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$status = 0;
+
+$sample_cfg = PerlACE::LocalFile ("sample.cfg");
+$svc_conf = PerlACE::LocalFile ("svc.conf");
# Run two copies of the same test...
-$T1 = Process::Create ($EXEPREFIX."EC_Mcast".$EXE_EXT,
- " -c $cwd$DIR_SEPARATOR" .
- "sample.cfg -ORBSvcConf $cwd$DIR_SEPARATOR" .
- "svc.conf -n 100 -t 50000 -f Set02");
-$T2 = Process::Create ($EXEPREFIX."EC_Mcast".$EXE_EXT,
- " -c $cwd$DIR_SEPARATOR" .
- "sample.cfg -ORBSvcConf $cwd$DIR_SEPARATOR" .
- "svc.conf -n 100 -t 50000 -f Set02");
-
-if ($T1->TimedWait (60) == -1) {
- print STDERR "ERROR: test1 timedout\n";
- $T1->Kill (); $T1->TimedWait (1);
- $T2->Kill (); $T2->TimedWait (1);
- exit 1;
+$T1 = new PerlACE::Process ("EC_Mcast",
+ "-c $sample_cfg -ORBSvcConf $svc_conf "
+ . "-n 100 -t 50000 -f Set02");
+$T2 = new PerlACE::Process ("EC_Mcast",
+ "-c $sample_cfg -ORBSvcConf $svc_conf "
+ . "-n 100 -t 50000 -f Set02");
+
+$T1->Spawn ();
+$T2->Spawn ();
+
+$test1 = $T1->WaitKill (60);
+
+if ($test1 != 0) {
+ print STDERR "ERROR: test 1 returned $test1\n";
+ $status = 1;
}
-if ($T2->TimedWait (60) == -1) {
- print STDERR "ERROR: test2 timedout\n";
- $T2->Kill (); $T2->TimedWait (1);
- exit 1;
+$test2 = $T2->WaitKill (60);
+
+if ($test2 != 0) {
+ print STDERR "ERROR: test 2 returned $test2\n";
+ $status = 1;
}
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl b/TAO/orbsvcs/tests/EC_Multiple/run_test.pl
index 1aef14e8855..704b47511d2 100755
--- a/TAO/orbsvcs/tests/EC_Multiple/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Multiple/run_test.pl
@@ -5,42 +5,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$NS_ior = "$cwd$DIR_SEPARATOR" . "NameService.ior";
$status = 0;
-ACE::checkForTarget($cwd);
-
-$NS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT,
- " -o $NS_ior ");
-if (ACE::waitforfile_timed ($NS_ior, 5) == -1) {
- print STDERR "ERROR: waiting for naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$NS_ior = PerlACE::LocalFile ("NameService.ior");
+
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $NS_ior");
+$T = new PerlACE::Process ("EC_Multiple",
+ "-ORBInitRef NameService=file://$NS_ior"
+ ." -s local");
+
+$NS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($NS_ior, 5) == -1) {
+ print STDERR "ERROR: waiting for naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
# This is a very simple test, no multiple consumers and no gateways.
-$TEST = Process::Create ($EXEPREFIX."EC_Multiple".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior"
- ." -s local");
-if ($TEST->TimedWait (60) == -1) {
- print STDERR "ERROR: test timedout\n";
- $status = 1;
- $TEST->Kill (); $TEST->TimedWait (1);
+$test = $T->SpawnWaitKill (60);
+
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: naming service returned $nserver\n";
+ $status = 1;
}
exit $status;
diff --git a/TAO/orbsvcs/tests/EC_Throughput/run_test.pl b/TAO/orbsvcs/tests/EC_Throughput/run_test.pl
index f95c59d72d4..ac539e0c499 100755
--- a/TAO/orbsvcs/tests/EC_Throughput/run_test.pl
+++ b/TAO/orbsvcs/tests/EC_Throughput/run_test.pl
@@ -5,103 +5,106 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$status = 0;
+
+$ec_conf = PerlACE::LocalFile ("ec.conf");
+$ec_mt_conf = PerlACE::LocalFile ("ec_mt_conf");
print STDERR "================ Collocated tests, single threaded\n";
-$T = Process::Create ($EXEPREFIX."ECT_Throughput".$EXE_EXT,
- " -ORBsvcconf $cwd$DIR_SEPARATOR" . "ec.conf" .
- " -m new -u 10000 -n 1 -t 0 -c 4");
+$T = new PerlACE::Process ("ECT_Throughput",
+ "-ORBsvcconf $ec_conf"
+ . " -m new -u 10000 -n 1 -t 0 -c 4");
+
+
+$test = $T->SpawnWaitKill (120);
-if ($T->TimedWait (120) == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ $status = 1;
}
print STDERR "================ Collocated tests, single threaded\n";
-$T = Process::Create ($EXEPREFIX."ECT_Throughput".$EXE_EXT,
- " -ORBsvcconf $cwd$DIR_SEPARATOR" . "ec.mt.conf" .
- " -m new -u 10000 -n 1 -t 0 -c 4");
+$T = new PerlACE::Process ("ECT_Throughput",
+ "-ORBsvcconf $ec_mt_conf"
+ . "-m new -u 10000 -n 1 -t 0 -c 4");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
- exit 1;
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ $status = 1;
}
print STDERR "================ Remote test\n";
-$ns_ior = "NameService.ior";
+$ns_ior = PerlACE::LocalFile ("NameService.ior");
unlink $ns_ior;
-$NS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT,
- " -o $ns_ior ");
-
-if (ACE::waitforfile_timed ($ns_ior, 5) == -1) {
- print STDERR "ERROR: cannot find file <$ns_ior>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service",
+ "-o $ns_ior");
+
+$ES = new PerlACE::Process ("../../Event_Service/Event_Service",
+ "-ORBInitRef NameService=file://$ns_ior "
+ . " -ORBSvcConf $ec_conf "
+ . " -t NEW");
+
+$C = new PerlACE::Process ("ECT_Consumer",
+ "-ORBInitRef NameService=file://$ns_ior "
+ . " -c 4 -s 1");
+
+$S = new PerlACE::Process ("ECT_Supplier",
+ "-ORBInitRef NameService=file://$ns_ior "
+ . " -s 1 -u 5000 -n 1 -t 0");
+
+$NS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($ns_ior, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$ns_ior>\n";
+ $NS->Kill ();
+ exit 1;
}
-$ES = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Event_Service".$DIR_SEPARATOR.
- "Event_Service".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior "
- ." -ORBSvcConf $cwd$DIR_SEPARATOR" . "ec.conf "
- . " -t NEW");
+$ES->Spawn ();
sleep 5;
-$C = Process::Create ($EXEPREFIX."ECT_Consumer".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior "
- . " -c 4 -s 1");
-
-$S = Process::Create ($EXEPREFIX."ECT_Supplier".$EXE_EXT,
- " -ORBInitRef NameService=file://$ns_ior "
- . " -s 1 -u 5000 -n 1 -t 0");
-
-if ($S->TimedWait (300) == -1) {
- print STDERR "ERROR: supplier timedout\n";
- $S->Kill (); $S->TimedWait (1);
- $C->Kill (); $C->TimedWait (1);
- $ES->Kill (); $ES->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$C->Spawn ();
+$S->Spawn ();
+
+$supplier = $S->WaitKill (300);
+
+if ($supplier != 0) {
+ print STDERR "ERROR: supplier returned $supplier\n";
+ $status = 1;
}
-if ($C->TimedWait (60) == -1) {
- print STDERR "ERROR: consumer timedout\n";
- $C->Kill (); $C->TimedWait (1);
- $ES->Kill (); $ES->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$consumer = $C->WaitKill (60);
+
+if ($consumer != 0) {
+ print STDERR "ERROR: consumer returned $consumer\n";
+ $status = 1;
}
-if ($ES->TimedWait (5) == -1) {
- print STDERR "ERROR: event channel timedout\n";
- $ES->Kill (); $ES->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$eserver = $ES->WaitKill (5);
+
+if ($eserver != 0) {
+ print STDERR "ERROR: event server returned $eserver\n";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: name server returned $nserver\n";
+ $status = 1;
}
unlink $ns_ior;
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
index 6811dd7c615..8ac6b2e0dc1 100755
--- a/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
+++ b/TAO/orbsvcs/tests/Event/Basic/exhaustive_test.pl
@@ -8,61 +8,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs the client and all the other servers that
# are needed
-unshift @INC, '../../../../../bin';
-require ACEutils;
-require Uniqueid;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
$status = 0;
-$conf_file = 'exhaustive.conf';
-@dispatching_configs = ("-ECDispatching reactive",
- "-ECDispatching mt -ECDispatchingThreads 4");
-@collection_strategies = ("copy_on_read",
- "copy_on_write",
- "delayed");
-@collection_types = ("list", "rb_tree");
-@filtering_configs = ("-ECFiltering prefix -ECSupplierFilter per-supplier",
- "-ECFiltering prefix -ECSupplierFilter null");
+$conf_file = PerlACE::LocalFile ('exhaustive.conf');
-foreach $d (@dispatching_configs) {
- foreach $f (@filtering_configs) {
- foreach $c (@collection_strategies) {
- foreach $t (@collection_types) {
- local $collection = "mt:".$c.":".$t;
- local $config =
- 'static EC_Factory "'
- .$d
- ." -ECProxyPushConsumerCollection ".$collection
- ." -ECProxyPushSupplierCollection ".$collection
- ." ".$f
- .'"';
- open (CONFIG,">$conf_file")
- || die "Cannot open $conf_file\n";
- print CONFIG $config, "\n";
- close (CONFIG);
-
- print STDERR "\n\n", $config, "\n";
+@dispatching_configs = ("-ECDispatching reactive",
+ "-ECDispatching mt -ECDispatchingThreads 4");
+@collection_strategies = ("copy_on_read",
+ "copy_on_write",
+ "delayed");
+@collection_types = ("list",
+ "rb_tree");
+@filtering_configs = ("-ECFiltering prefix -ECSupplierFilter per-supplier",
+ "-ECFiltering prefix -ECSupplierFilter null");
- system ("purify.exe ".
- "/run .\\Release\\Random.exe ".
- " -ORBSvcConf "
- .$cwd.$DIR_SEPARATOR.
- "$conf_file"
- ." -suppliers 16"
- ." -consumers 16"
- ." -max_recursion 0");
-# $T = Process::Create ("c:\\Program Files\\Rational\\Purify\\purify.exe"
-# if ($T->TimedWait (900) == -1) {
-# print STDERR "ERROR: Test timedout\n";
-# $status = 1;
-# $T->Kill (); $T->TimedWait (1);
-# }
- }
+foreach $d (@dispatching_configs) {
+ foreach $f (@filtering_configs) {
+ foreach $c (@collection_strategies) {
+ foreach $t (@collection_types) {
+ my $collection = "mt:".$c.":".$t;
+
+ my $config = 'static EC_Factory "'
+ .$d
+ ." -ECProxyPushConsumerCollection ".$collection
+ ." -ECProxyPushSupplierCollection ".$collection
+ ." ".$f
+ .'"';
+
+ open (CONFIG,">$conf_file") || die "Cannot open $conf_file\n";
+ print CONFIG $config, "\n";
+ close (CONFIG);
+
+ print STDERR "\n\n", $config, "\n";
+
+ system ("purify.exe "
+ . "/run .\\Release\\Random.exe "
+ . " -ORBSvcConf $conf_file"
+ . " -suppliers 16"
+ . " -consumers 16"
+ . " -max_recursion 0");
+ }
+ }
}
- }
}
unlink "$conf_file";
diff --git a/TAO/orbsvcs/tests/Event/Basic/run_test.pl b/TAO/orbsvcs/tests/Event/Basic/run_test.pl
index 1aa10dae736..cbe4506e0d2 100755
--- a/TAO/orbsvcs/tests/Event/Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/Event/Basic/run_test.pl
@@ -8,158 +8,94 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs the client and all the other servers that
# are needed
-unshift @INC, '../../../../../bin';
-require ACEutils;
-require Uniqueid;
-use Cwd;
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
$status = 0;
-print STDERR "\n\nReconnect suppliers and consumers,",
- " using disconnect/connect calls\n";
-$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
- " -suppliers 100 -consumers 100 -d 100");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
+$svc_conf = PerlACE::LocalFile ("svc.conf");
+$observer_conf = PerlACE::LocalFile ("observer.conf");
+$svc_complex_conf = PerlACE::LocalFile ("svc.complex.conf");
+$mt_svc_conf = PerlACE::LocalFile ("mt.svc.conf");
+$svc_complex_conf = PerlACE::LocalFile ("svc.complex.conf");
+$control_conf = PerlACE::LocalFile ("control.conf");
+
+sub RunTest ($$$)
+{
+ my $message = shift;
+ my $program = shift;
+ my $arguments = shift;
+
+ my $TEST = new PerlACE::Process ($program, $arguments);
+
+ print STDERR "\n\n$message\n";
+
+ my $test = $TEST->SpawnWaitKill (240);
+
+ if ($test != 0) {
+ print STDERR "ERROR: Test returned $test\n";
+ $status = 1;
+ }
}
-print STDERR "\n\nReconnect suppliers and consumers, using connect calls\n";
-$T = Process::Create ($EXEPREFIX . "Reconnect".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
- " -suppliers 100 -consumers 100 -d 100 -s -c");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Reconnect suppliers and consumers, using disconnect/connect calls",
+ "Reconnect",
+ "-ORBsvcconf $svc_conf -suppliers 100 -consumers 100 -d 100");
+RunTest ("Reconnect suppliers and consumers, using connect calls",
+ "Reconnect",
+ "-ORBsvcconf $svc_conf -suppliers 100 -consumers 100 -d 100 -s -c");
-print STDERR "\n\nShutdown EC with clients still attached\n";
-$T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf" .
- " -suppliers 5 -consumers 5");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Shutdown EC with clients still attached",
+ "Shutdown",
+ "-ORBsvcconf $svc_conf -suppliers 5 -consumers 5");
-print STDERR "\n\nGateway test\n";
-$T = Process::Create ($EXEPREFIX . "Gateway".$EXE_EXT,
- " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Gateway test",
+ "Gateway",
+ "-ORBsvcconf $observer_conf");
-print STDERR "\n\nComplex event channel test,",
- "multiple ECs connected through gateways\n";
-$T = Process::Create ($EXEPREFIX . "Observer".$EXE_EXT,
- " -ORBsvcconf $cwd$DIR_SEPARATOR" . "observer.conf"
- ." -consumer_tshift 0 -consumers 5"
- ." -supplier_tshift 0 -suppliers 2"
- ." -burstsize 10 -burstcount 10 -burstpause 0");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Complex event channel test, multiple ECs connected through gateways",
+ "Observer",
+ "-ORBsvcconf $observer_conf -consumer_tshift 0 -consumers 5 -supplier_tshift 0 -suppliers 2 -burstsize 10 -burstcount 10 -burstpause 0");
-print STDERR "\n\nTimeout tests\n";
-$T = Process::Create ($EXEPREFIX . "Timeout".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Timeout tests",
+ "Timeout",
+ "-ORBsvcconf $svc_conf");
-print STDERR "\n\nWildcard tests\n";
-$T = Process::Create ($EXEPREFIX . "Wildcard".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Wildcard tests",
+ "Wildcard",
+ "-ORBsvcconf $svc_conf");
-print STDERR "\n\nNegation tests\n";
-$T = Process::Create ($EXEPREFIX . "Negation".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Negation tests",
+ "Negation",
+ "-ORBsvcconf $svc_conf");
-print STDERR "\n\nBitmask tests\n";
-$T = Process::Create ($EXEPREFIX . "Bitmask".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Bitmask tests",
+ "Bitmask",
+ "-ORBSvcConf $svc_complex_conf");
-print STDERR "\n\nDisconnect callbacks test\n";
-$T = Process::Create ($EXEPREFIX . "Disconnect".$EXE_EXT,
- "-ORBsvcconf $cwd$DIR_SEPARATOR" . "svc.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Disconnect callbacks test",
+ "Disconnect",
+ "-ORBsvcconf $svc_conf");
-print STDERR "\n\nMT Disconnects test\n";
-$T = Process::Create ($EXEPREFIX . "MT_Disconnect".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf");
-if ($T->TimedWait (240) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("MT Disconnects test",
+ "MT_Disconnect",
+ "-ORBSvcConf $mt_svc_conf");
-print STDERR "\n\nAtomic Reconnection test\n";
-$T = Process::Create ($EXEPREFIX . "Atomic_Reconnect".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "mt.svc.conf");
-if ($T->TimedWait (120) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Atomic Reconnection test",
+ "Atomic_Reconnect",
+ "-ORBSvcConf $mt_svc_conf");
-print STDERR "\n\nComplex filter\n";
-$T = Process::Create ($EXEPREFIX . "Complex".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.complex.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Complex filter",
+ "Complex",
+ "-ORBSvcConf $svc_complex_conf");
-print STDERR "\n\nControl test\n";
-$T = Process::Create ($EXEPREFIX . "Control".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "control.conf");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Control test",
+ "Control",
+ "-ORBSvcConf $control_conf");
-print STDERR "\n\nRandom test\n";
-$T = Process::Create ($EXEPREFIX . "Random".$EXE_EXT,
- " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.conf"
- . " -suppliers 4 -consumers 4 -max_recursion 1");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("Random test",
+ "Random",
+ "-ORBSvcConf $svc_conf -suppliers 4 -consumers 4 -max_recursion 1");
exit $status;
diff --git a/TAO/orbsvcs/tests/Event/Performance/run_test.pl b/TAO/orbsvcs/tests/Event/Performance/run_test.pl
index 94acf56453f..56145ed31e7 100755
--- a/TAO/orbsvcs/tests/Event/Performance/run_test.pl
+++ b/TAO/orbsvcs/tests/Event/Performance/run_test.pl
@@ -8,94 +8,58 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs the client and all the other servers that
# are needed
-unshift @INC, '../../../../../bin';
-require ACEutils;
-require Uniqueid;
-use Cwd;
-
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+use lib '../../../../../bin';
+use PerlACE::Run_Test;
$status = 0;
-print STDERR "\n\nThroughput/Latency single threaded configuration\n";
-$T = Process::Create ($EXEPREFIX . "Throughput".$EXE_EXT,
- " -ORBsvcconf $cwd$DIR_SEPARATOR" . "ec.st.conf "
- . "-burstsize 2000 -burstcount 1");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+$ec_st_conf = PerlACE::LocalFile ("ec.st.conf");
+sub RunTest ($$$)
+{
+ my $message = shift;
+ my $program = shift;
+ my $arguments = shift;
-print STDERR "\n\nThroughput/Latency MT-safe configuration\n";
-$T = Process::Create ($EXEPREFIX . "Throughput".$EXE_EXT,
- " -burstsize 2000"
- ." -burstcount 1");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+ my $TEST = new PerlACE::Process ($program, $arguments);
+ print STDERR "\n\n$message\n";
+
+ my $test = $TEST->SpawnWaitKill (60);
-print STDERR "\n\nThroughput/Latency MT-safe configuration, 4 consumers\n";
-$T = Process::Create ($EXEPREFIX . "Throughput".$EXE_EXT,
- " -burstsize 2000"
- ." -burstcount 1 -consumers 4");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
+ if ($test != 0) {
+ print STDERR "ERROR: Test returned $test\n";
+ $status = 1;
+ }
}
+RunTest ("\n\nThroughput/Latency single threaded configuration\n",
+ "Throughput",
+ "-ORBsvcconf $ec_st_conf -burstsize 2000 -burstcount 1");
-print STDERR "\n\nThroughput/Latency MT-safe configuration,",
- " 4 consumers 4 suppliers\n";
-$T = Process::Create ($EXEPREFIX . "Throughput".$EXE_EXT,
- " -burstsize 2000"
- ." -burstcount 1 -consumers 4 -suppliers 4");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("\n\nThroughput/Latency MT-safe configuration\n",
+ "Throughput",
+ "-burstsize 2000 -burstcount 1");
+RunTest ("\n\nThroughput/Latency MT-safe configuration, 4 consumers\n",
+ "Throughput",
+ "-burstsize 2000 -burstcount 1 -consumers 4");
-print STDERR "\n\nThroughput/Latency MT-safe configuration,",
- " 4 consumers 4 suppliers\n";
-$T = Process::Create ($EXEPREFIX . "Throughput".$EXE_EXT,
- " -burstsize 2000"
- ." -burstcount 1 -consumers 4 -suppliers 4"
- ." -consumers_tshift 0 -suppliers_tshift 0");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("\n\nThroughput/Latency MT-safe configuration, 4 consumers 4 suppliers\n",
+ "Throughput",
+ "-burstsize 2000 -burstcount 1 -consumers 4 -suppliers 4");
-print STDERR "\n\nConnection and disconnection time,",
- " 100 consumers 100 suppliers\n";
-$T = Process::Create ($EXEPREFIX . "Connect".$EXE_EXT,
- " -consumers 100 -suppliers 100"
- ." -connection_order interleaved");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("\n\nThroughput/Latency MT-safe configuration, 4 consumers 4 suppliers\n",
+ "Throughput",
+ "-burstsize 2000 -burstcount 1 -consumers 4 -suppliers 4"
+ . " -consumers_tshift 0 -suppliers_tshift 0");
+RunTest ("\n\nConnection and disconnection time, 100 consumers 100 suppliers\n",
+ "Connect",
+ "-consumers 100 -suppliers 100 -connection_order interleaved");
-print STDERR "\n\nConnection and disconnection time,",
- " 500 consumers 500 suppliers\n";
-$T = Process::Create ($EXEPREFIX . "Connect".$EXE_EXT,
- " -consumers 500 -suppliers 500"
- ." -connection_order interleaved");
-if ($T->TimedWait (60) == -1) {
- print STDERR "ERROR: Test timedout\n";
- $status = 1;
- $T->Kill (); $T->TimedWait (1);
-}
+RunTest ("\n\nConnection and disconnection time, 500 consumers 500 suppliers\n",
+ "Connect",
+ "-consumers 500 -suppliers 500 -connection_order interleaved");
exit $status;
diff --git a/TAO/orbsvcs/tests/Event_Latency/run_test.pl b/TAO/orbsvcs/tests/Event_Latency/run_test.pl
index e7d20789200..71a7436bb3e 100755
--- a/TAO/orbsvcs/tests/Event_Latency/run_test.pl
+++ b/TAO/orbsvcs/tests/Event_Latency/run_test.pl
@@ -5,59 +5,56 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$NS_ior = "$cwd$DIR_SEPARATOR" . "NameService.ior";
+$NS_ior = PerlACE::LocalFile ("NameService.ior");
$sleeptime = 3;
$status = 0;
-ACE::checkForTarget($cwd);
+unlink $NS_ior;
+
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service",
+ "-o $NS_ior ");
+$ES = new PerlACE::Process ("../../Event_Service/Event_Service",
+ "-ORBInitRef NameService=file://$NS_ior -t new");
+$T = new PerlACE::Process ("Event_Latency",
+ "-ORBInitRef NameService=file://$NS_ior"
+ . " -j -m 100");
-$NS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
- ."..".$DIR_SEPARATOR
- ."Naming_Service".$DIR_SEPARATOR
- ."Naming_Service".$EXE_EXT,
- " -o $NS_ior ");
+$NS->Spawn ();
-if (ACE::waitforfile_timed ($NS_ior, 5) == -1) {
- print STDERR "ERROR: waiting for naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($NS_ior, 5) == -1) {
+ print STDERR "ERROR: waiting for naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-$ES = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
- ."..".$DIR_SEPARATOR
- ."Event_Service".$DIR_SEPARATOR
- ."Event_Service".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior -t new");
+$ES->Spawn ();
sleep $sleeptime;
-$TEST = Process::Create ($EXEPREFIX.".".$DIR_SEPARATOR."Event_Latency".$EXE_EXT,
- "-ORBInitRef NameService=file://$NS_ior"
- ." -j -m 100");
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ $status = 1;
+}
+
+$nserver = $NS->TerminateWaitKill (5);
-if ($TEST->TimedWait (60) == -1) {
- print STDERR "ERROR: test timedout\n";
- $status = 1;
- $TEST->Kill (); $TEST->TimedWait (1);
+if ($nserver != 0) {
+ print STDERR "ERROR: name server returned $nserver\n";
+ $status = 1;
}
+$eserver = $ES->TerminateWaitKill (5);
-$NS->Terminate();
-$ES->Terminate();
-if ($NS->TimedWait (5) == -1 || $ES->TimedWait (5) == -1) {
- print STDERR "ERROR: couldn't terminate the services nicely\n";
- $NS->Kill (); $NS->TimedWait (1);
- $ES->Kill (); $ES->TimedWait (1);
- $status = 1;
+if ($eserver != 0) {
+ print STDERR "ERROR: event server returned $eserver\n";
+ $status = 1;
}
unlink $NS_ior;
-# @@ Capture any errors from the server too.
exit $status;
diff --git a/TAO/orbsvcs/tests/ImplRepo/NameService/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/NameService/run_test.pl
index 7b3fa36d070..c7ae582978f 100755
--- a/TAO/orbsvcs/tests/ImplRepo/NameService/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/NameService/run_test.pl
@@ -6,72 +6,109 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../../bin";
-
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
+use PerlACE::Run_Test;
################################################################################
# Program locations
-$imr_ior = "$cwd$DIR_SEPARATOR" . "imr.ior";
-$name_ior = "$cwd$DIR_SEPARATOR" . "name.ior";
-
-$imr_server = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.".."
- .$DIR_SEPARATOR."ImplRepo_Service"
- .$DIR_SEPARATOR."ImplRepo_Service".$EXE_EXT;
-
-$name_server = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.".."
- .$DIR_SEPARATOR."Naming_Service"
- .$DIR_SEPARATOR."Naming_Service".$EXE_EXT;
+$imr_ior = PerlACE::LocalFile ("imr.ior");
+$name_ior = PerlACE::LocalFile ("name.ior");
+$IMR = new PerlACE::Process ("../../../ImplRepo_Service/ImplRepo_Service");
+$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service");
if ($^O eq "MSWin32") {
- # Just find it in the path
- $tao_imr = "tao_imr".$EXE_EXT;
+ $TAO_IMR = new PerlACE::Process ("../../../../../bin/tao_imr");
}
else {
- $tao_imr = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.".."
- .$DIR_SEPARATOR."ImplRepo_Service"
- .$DIR_SEPARATOR."tao_imr".$EXE_EXT;
+ $TAO_IMR = new PerlACE::Process ("../../../ImplRepo_Service/tao_imr");
}
-$test = $EXEPREFIX."test".$EXE_EXT;
+$TEST = new PerlACE::Process ("test");
################################################################################
$errors = 0;
-ACE::checkForTarget($cwd);
-
unlink $imr_ior;
unlink $name_ior;
-$IR = Process::Create ($imr_server, "-o $imr_ior -d 0");
+################################################################################
+## Start the implementation Repository
+
+$IMR->Arguments ("-o $imr_ior -d 0");
+$IMR->Spawn ();
+
+if (PerlACE::waitforfile_timed ($imr_ior, 5) == -1) {
+ print STDERR "ERROR: waiting for $imr_ior\n";
+ $IMR->Kill ();
+ exit 1;
+}
-ACE::waitforfile ($imr_ior);
+################################################################################
+## Register the NameService
-system ($tao_imr." -ORBInitRef ImplRepoService=file://$imr_ior"
- ." add NameService "
- ." -c \"$name_server"
+$TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_ior"
+ . " add NameService "
+ ." -c \"" . $NS->Executable ()
." -ORBInitRef ImplRepoService=file://$imr_ior"
." -ORBUseIMR 1 .\"");
-system ($tao_imr." -ORBInitRef ImplRepoService=file://$imr_ior"
- ." ior NameService -f $name_ior");
+$taoimr = $TAO_IMR->SpawnWaitKill (60);
-if (system ($test." -ORBInitRef NameService=file://$name_ior")) {
+if ($tao_imr != 0) {
+ print STDERR "ERROR: tao_imr (add) returned $tao_imr\n";
++$errors;
}
-system ($tao_imr." -ORBInitRef ImplRepoService=file://$imr_ior"
- ." shutdown NameService ");
+################################################################################
+## Create IOR for NameService
+
+$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$imr_ior"
+ . " ior NameService -f $name_ior");
-$IR->Kill (); $IR->Wait ();
+$taoimr = $TAO_IMR->SpawnWaitKill (60);
-if ($errors > 0) {
- print "Error: run_test.pl detected $errors errors!\n";
+if ($tao_imr != 0) {
+ print STDERR "ERROR: tao_imr (ior) returned $tao_imr\n";
+ ++$errors;
}
-exit ($errors);
+
+################################################################################
+## Run the test
+
+$TEST->Arguments ("-ORBInitRef NameService=file://$name_ior");
+
+$test = $TEST->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ ++$errors;
+}
+
+
+################################################################################
+## Shutdown the NameService
+
+$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$imr_ior shutdown "
+ . "NameService ");
+
+$taoimr = $TAO_IMR->SpawnWaitKill (60);
+
+if ($tao_imr != 0) {
+ print STDERR "ERROR: tao_imr (shutdown) returned $tao_imr\n";
+ ++$errors;
+}
+
+################################################################################
+## Kill the IMR
+
+$iserver = $IMR->TerminateWaitKill (5);
+
+if ($iserver != 0) {
+ print STDERR "ERROR: IMR returned $iserver\n";
+ ++$errors;
+}
+
+exit $errors;
diff --git a/TAO/orbsvcs/tests/ImplRepo/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
index a10af6303a1..fa884460a26 100755
--- a/TAO/orbsvcs/tests/ImplRepo/run_test.pl
+++ b/TAO/orbsvcs/tests/ImplRepo/run_test.pl
@@ -6,29 +6,23 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
###############################################################################
+use lib "../../../../bin";
+use PerlACE::Run_Test;
use Cwd;
use Sys::Hostname;
use File::Copy;
-BEGIN {
- ### We need to BEGIN this block so we make sure ACE_ROOT is set before
- ### we use it in the use lib line
- $cwd = getcwd();
+$cwd = getcwd();
- $ACE_ROOT = $ENV{ACE_ROOT};
+$ACE_ROOT = $ENV{ACE_ROOT};
- if (!$ACE_ROOT) {
- chdir ('../../../../');
- $ACE_ROOT = getcwd ();
- chdir ($cwd);
- print "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT\n";
- }
+if (!defined $ACE_ROOT) {
+ chdir ('../../../../');
+ $ACE_ROOT = getcwd ();
+ chdir ($cwd);
+ print "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT\n";
}
-use lib "$ACE_ROOT/bin";
-
-use PerlACE::Run_Test;
-
$airplane_ior = PerlACE::LocalFile ("airplane.ior");
$nestea_ior = PerlACE::LocalFile ("nestea.ior");
$implrepo_ior = PerlACE::LocalFile ("implrepo.ior");
@@ -36,11 +30,12 @@ $implrepo_ior = PerlACE::LocalFile ("implrepo.ior");
$refstyle = " -ORBobjrefstyle URL";
$backing_store = "imr_backing_store";
+$nestea_dat = "nestea.dat";
$protocol = "iiop";
$host = hostname();
$port = 12345;
-$endpoint = "-ORBEndpoint" . "$protocol" . "://" . "$host" . ":" . $port;
+$endpoint = "-ORBEndpoint " . "$protocol" . "://" . "$host" . ":" . $port;
$IMR = new PerlACE::Process ("../../ImplRepo_Service/ImplRepo_Service");
@@ -65,81 +60,155 @@ unlink $airplane_ior;
unlink $nestea_ior;
unlink $implrepo_ior;
-sub convert_slash($)
-{
- $cmd = shift;
-
- $cmd =~ s/\//\\/g;
-
- return $cmd;
-}
-
# The Tests
###############################################################################
sub airplane_test
{
+ my $status = 0;
+
$A_SVR->Arguments ("-o $airplane_ior $refstyle");
$A_SVR->Spawn ();
- PerlACE::waitforfile ($airplane_ior);
+ if (PerlACE::waitforfile_timed ($airplane_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $airplane_ior\n";
+ $A_SVR->Kill ();
+ return 1;
+ }
- $A_CLI->SpawnWaitKill (300);
+ my $client = $A_CLI->SpawnWaitKill (300);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
- $A_SVR->Kill (); $A_SVR->Wait ();
+ my $server = $A_SVR->TerminateWaitKill (5);
+
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+ }
+
+ return $status;
}
###############################################################################
sub nestea_test
{
+ my $status = 0;
+ unlink $nestea_dat;
+
$N_SVR->Arguments ("-o $nestea_ior $refstyle");
$N_SVR->Spawn ();
- PerlACE::waitforfile ($nestea_ior);
-
- $N_CLI->SpawnWaitKill (300);
+ if (PerlACE::waitforfile_timed ($nestea_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $nestea_ior\n";
+ $N_SVR->Kill ();
+ return 1;
+ }
+
+ my $client = $N_CLI->SpawnWaitKill (300);
- $N_SVR->Kill (); $N_SVR->Wait ();
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
+
+ $server = $N_SVR->TerminateWaitKill (5);
+
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+ }
+
+ unlink $nestea_dat;
+ return $status;
}
###############################################################################
+# @todo: This test doesn't clean up too well if something fails
sub nt_service_test
{
- my $BIN_IMR = new PerlACE::Process (convert_slash ("$ACE_ROOT/bin/ImplRepo_Service"),
+ my $result = 0;
+
+ my $BIN_IMR = new PerlACE::Process ("$ACE_ROOT/bin/ImplRepo_Service",
"-c install");
print "Copying ImplRepo_Service to bin\n";
copy ($IMR->Executable (), $BIN_IMR->Executable ());
print "Installing TAO Implementation Repository Service\n";
- $BIN_IMR->SpawnWaitKill (300);
+ $result = $BIN_IMR->SpawnWaitKill (300);
+
+ if ($result != 0) {
+ print STDERR "ERROR: IMR installation returned $result\n";
+ return 1;
+ }
print "Starting TAO Implementation Repository Service\n";
- my $NET = new PerlACE::Process ($ENV{'SystemRoot'}."/System32/net",
+ my $NET = new PerlACE::Process ("net",
"start \"TAO Implementation Repository\"");
- $NET->SpawnWaitKill (300);
+ $NET->IgnoreExeSubDir (1);
+
+ $result = $NET->SpawnWaitKill (300);
+ if ($result != 0) {
+ print STDERR "ERROR: net returned $result\n";
+ return 1;
+ }
$TAO_IMR->Arguments ("add airplane_server -c \""
. $A_SVR->Executable () .
" -ORBUseIMR 1\" -w \"$ACE_ROOT/bin\"");
- $TAO_IMR->SpawnWaitKill (100);
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ return 1;
+ }
$A_SVR->Arguments ("-o $airplane_ior -ORBUseIMR 1");
$A_SVR->Spawn ();
- PerlACE::waitforfile ($airplane_ior);
+ if (PerlACE::waitforfile_timed ($airplane_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $airplane_ior\n";
+ $A_SVR->Kill ();
+ return 1;
+ }
- $A_CLI->SpawnWaitKill (100);
+ $result = $A_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane client returned $result\n";
+ return 1;
+ }
$TAO_IMR->Arguments ("shutdown airplane_server");
- $TAO_IMR->SpawnWaitKill (100);
- $A_CLI->SpawnWaitKill (100);
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ return 1;
+ }
- $TAO_IMR->SpawnWaitKill (100);
+ $result = $A_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane client returned $result\n";
+ return 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ return 1;
+ }
print "Stopping TAO Implementation Repository Service\n";
$NET->Arguments ("stop \"TAO Implementation Repository\"");
@@ -150,94 +219,260 @@ sub nt_service_test
$BIN_IMR->SpawnWaitKill (300);
print "Removing ImplRepo_Service from bin\n";
- unlink ($bin_implrepo_server);
+ unlink $BIN_IMR->Executable ();
+
+ return 0;
}
###############################################################################
sub airplane_ir_test
{
+ my $status = 0;
+ my $result = 0;
+
$IMR->Arguments ("-o $implrepo_ior");
$IMR->Spawn ();
- PerlACE::waitforfile ($implrepo_ior);
+ if (PerlACE::waitforfile_timed ($implrepo_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $implrepo_ior\n";
+ $IMR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("add airplane_server -c \""
. $A_SVR->Executable ()
. " -ORBUseIMR 1 -o $airplane_ior\"");
- $TAO_IMR->SpawnWaitKill (300);
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ $IMR->Kill ();
+ return 1;
+ }
+
$A_SVR->Arguments ("-ORBUseIMR 1 -o $airplane_ior");
$A_SVR->Spawn ();
- PerlACE::waitforfile ($airplane_ior);
+ if (PerlACE::waitforfile_timed ($airplane_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $airplane_ior\n";
+ $IMR->Kill ();
+ $A_SVR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("shutdown airplane_server");
- $A_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
- $A_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
+ $result = $A_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane_client 1 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr 1 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $A_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane_client 2 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr 2 returned $result\n";
+ $status = 1;
+ }
- $IMR->Kill (); $IMR->Wait ();
+ my $server = $A_SVR->WaitKill (5);
+
+ if ($server != 0) {
+ print STDERR "ERROR: airplane server returned $server\n";
+ $status = 1;
+ }
+
+ my $implrepo = $IMR->TerminateWaitKill (5);
+
+ if ($implrepo != 0) {
+ print STDERR "ERROR: IMR returned $implrepo\n";
+ $status = 1;
+ }
+
+ return $status;
}
###############################################################################
sub nestea_ir_test
{
- $IMR->Arguments ("-o $implrepo_ior -d 0 $refstyle");
+ unlink $nestea_dat;
+ my $status = 0;
+ my $result = 0;
+
+ $IMR->Arguments ("-o $implrepo_ior");
$IMR->Spawn ();
- PerlACE::waitforfile ($implrepo_ior);
+ if (PerlACE::waitforfile_timed ($implrepo_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $implrepo_ior\n";
+ $IMR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("add nestea_server -c \""
. $N_SVR->Executable ()
. " -ORBUseIMR 1 -o $nestea_ior\"");
- $TAO_IMR->SpawnWaitKill (300);
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ $IMR->Kill ();
+ return 1;
+ }
+
$N_SVR->Arguments ("-ORBUseIMR 1 -o $nestea_ior");
$N_SVR->Spawn ();
- PerlACE::waitforfile ($nestea_ior);
+ if (PerlACE::waitforfile_timed ($nestea_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $nestea_ior\n";
+ $IMR->Kill ();
+ $N_SVR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("shutdown nestea_server");
- $N_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
- $N_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
+ $result = $N_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: nestea client 1 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr 1 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $N_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: nestea client 2 returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
- $IMR->Kill (); $IMR->Wait ();
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr 2 returned $result\n";
+ $status = 1;
+ }
+
+ my $server = $N_SVR->WaitKill (5);
+
+ if ($server != 0) {
+ print STDERR "ERROR: nestea server returned $server\n";
+ $status = 1;
+ }
+
+ my $implrepo = $IMR->TerminateWaitKill (5);
+
+ if ($implrepo != 0) {
+ print STDERR "ERROR: IMR returned $implrepo\n";
+ $status = 1;
+ }
+
+ unlink $nestea_dat;
+ return $status;
}
###############################################################################
sub persistent_ir_test
{
+ my $status = 0;
+ my $result = 0;
unlink $backing_store;
$IMR->Arguments ("$endpoint -o $implrepo_ior -p $backing_store -d 0");
$IMR->Spawn ();
- PerlACE::waitforfile ($implrepo_ior);
+ if (PerlACE::waitforfile_timed ($implrepo_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $implrepo_ior\n";
+ $IMR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior add airplane_server -c \"".$A_SVR->Executable ()." -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior\"");
- $TAO_IMR->SpawnWaitKill (100);
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ $IMR->Kill ();
+ return 1;
+ }
$A_SVR->Arguments ("-o $airplane_ior -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior");
$A_SVR->Spawn ();
- PerlACE::waitforfile ($airplane_ior);
+ if (PerlACE::waitforfile_timed ($airplane_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $airplane_ior\n";
+ $IMR->Kill ();
+ $A_SVR->Kill ();
+ return 1;
+ }
+
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server");
+
+ $result = $A_CLI->SpawnWaitKill (100);
- $A_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
- $A_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
+ if ($result != 0) {
+ print STDERR "ERROR: airplane client returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ $status = 1;
+ }
+
+ $result = $A_CLI->SpawnWaitKill (100);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane client returned $result\n";
+ $status = 1;
+ }
+
+ $result = $TAO_IMR->SpawnWaitKill (30);
+
+ if ($result != 0) {
+ print STDERR "ERROR: tao_imr returned $result\n";
+ $status = 1;
+ }
+
+ $result = $A_SVR->WaitKill (10);
+
+ if ($result != 0) {
+ print STDERR "ERROR: airplane server returned $result\n";
+ $status = 1;
+ }
print "\nShutting down Implementation Repository\n\n";
- $IMR->Kill (); $IMR->Wait ();
+ $IMR->Kill ();
print "Restarting Implementation Repository.\n";
$IMR->Arguments ("$endpoint -p $backing_store -d 0");
@@ -246,9 +481,9 @@ sub persistent_ir_test
PerlACE::waitforfile ($implrepo_ior);
$A_CLI->SpawnWaitKill (100);
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
- $IMR->Kill (); $IMR->Wait ();
+ $IMR->Kill ();
unlink $backing_store;
}
@@ -257,15 +492,20 @@ sub persistent_ir_test
sub both_ir_test
{
+ my $status = 0;
$IMR->Arguments ("-o $implrepo_ior -d 0 $refstyle");
$IMR->Spawn ();
- PerlACE::waitforfile ($implrepo_ior);
+ if (PerlACE::waitforfile_timed ($implrepo_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $implrepo_ior\n";
+ $IMR->Kill ();
+ return 1;
+ }
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior add airplane_server -c \""
. $A_SVR->Executable ()
. " -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior\"");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior"
. " add nestea_server"
@@ -273,7 +513,7 @@ sub both_ir_test
. " -ORBUseIMR 1"
. " $refstyle -ORBInitRef"
. " ImplRepoService=file://$implrepo_ior\"");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
$N_SVR->Arguments ("-o $nestea_ior -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior");
$N_SVR->Spawn ();
@@ -281,8 +521,21 @@ sub both_ir_test
$A_SVR->Arguments ("-o $airplane_ior -ORBUseIMR 1 $refstyle -ORBInitRef ImplRepoService=file://$implrepo_ior");
$A_SVR->Spawn ();
- PerlACE::waitforfile ($nestea_ior);
- PerlACE::waitforfile ($airplane_ior);
+ if (PerlACE::waitforfile_timed ($airplane_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $airplane_ior\n";
+ $IMR->Kill ();
+ $A_SVR->Kill ();
+ $N_SVR->Kill ();
+ return 1;
+ }
+
+ if (PerlACE::waitforfile_timed ($nestea_ior, 10) == -1) {
+ print STDERR "ERROR: cannot find $nestea_ior\n";
+ $IMR->Kill ();
+ $A_SVR->Kill ();
+ $N_SVR->Kill ();
+ return 1;
+ }
$N_CLI->Spawn ();
$A_CLI->Spawn ();
@@ -291,24 +544,24 @@ sub both_ir_test
$A_CLI->WaitKill (100);
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior shutdown nestea_server");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
$N_CLI->Spawn (100);
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
$A_CLI->SpawnWaitKill (100);
$N_CLI->WaitKill (100);
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior shutdown nestea_server");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
$TAO_IMR->Arguments ("-ORBInitRef ImplRepoService=file://$implrepo_ior shutdown airplane_server");
- $TAO_IMR->SpawnWaitKill (100);
+ $TAO_IMR->SpawnWaitKill (30);
- $A_SVR->Kill (); $A_SVR->Wait ();
- $N_SVR->Kill (); $N_SVR->Wait ();
- $IMR->Kill (); $IMR->Wait ();
+ $A_SVR->Kill ();
+ $N_SVR->Kill ();
+ $IMR->Kill ();
}
###############################################################################
@@ -316,58 +569,42 @@ sub both_ir_test
# Parse the arguments
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-chorus <target>] test\n";
- print "\n";
- print "-chorus <target> -- Runs the test on Chorus target\n";
- print "test -- Runs a specific test:\n";
- print " airplane, airplane_ir, nt_service, ",
- "nestea, nestea_ir,\n";
- print " both_ir, persistent_ir\n";
- exit;
- }
- if ($ARGV[$i] eq "airplane")
- {
- airplane_test ();
- exit;
- }
- if ($ARGV[$i] eq "airplane_ir")
- {
- airplane_ir_test ();
- exit;
- }
- if ($ARGV[$i] eq "nt_service")
- {
- nt_service_test ();
- exit;
- }
- if ($ARGV[$i] eq "nestea")
- {
- nestea_test ();
- exit;
- }
- if ($ARGV[$i] eq "nestea_ir")
- {
- nestea_ir_test ();
- exit;
- }
- if ($ARGV[$i] eq "both_ir")
- {
- both_ir_test ();
- exit;
- }
- if ($ARGV[$i] eq "persistent_ir")
- {
- persistent_ir_test ();
- exit;
- }
- print "run_test: Unknown Option: ".$ARGV[$i]."\n";
- }
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test test\n";
+ print "\n";
+ print "test -- Runs a specific test:\n";
+ print " airplane, airplane_ir, nt_service, ",
+ "nestea, nestea_ir,\n";
+ print " both_ir, persistent_ir\n";
+ exit;
+ }
+ elsif ($ARGV[$i] eq "airplane") {
+ exit airplane_test ();
+ }
+ elsif ($ARGV[$i] eq "airplane_ir") {
+ exit airplane_ir_test ();
+ }
+ elsif ($ARGV[$i] eq "nt_service") {
+ exit nt_service_test ();
+ }
+ elsif ($ARGV[$i] eq "nestea") {
+ exit nestea_test ();
+ }
+ elsif ($ARGV[$i] eq "nestea_ir") {
+ exit nestea_ir_test ();
+ }
+ elsif ($ARGV[$i] eq "both_ir") {
+ exit both_ir_test ();
+ }
+ elsif ($ARGV[$i] eq "persistent_ir") {
+ exit persistent_ir_test ();
+ }
+ else {
+ print "run_test: Unknown Option: ".$ARGV[$i]."\n";
+ }
}
-both_ir_test ();
+# if nothing else, run both_ir
+
+exit both_ir_test ();
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl
index 69c35f0f832..78da7eee3b2 100755
--- a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl
@@ -6,94 +6,87 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../../bin";
+use PerlACE::Run_Test;
-require ACEutils;
-use Cwd;
+$status = 0;
-BEGIN {
- ### We need to BEGIN this block so we make sure ACE_ROOT is set before
- ### we use it in the use lib line
- $cwd = getcwd();
+$ifr_iorfile= "if_repo.ior";
+$svr_iorfile = "iorfile";
+$test_idl = PerlACE::LocalFile ("test.idl");
- $ACE_ROOT = $ENV{ACE_ROOT};
-
- if (!$ACE_ROOT) {
- chdir ('../../../../');
- $ACE_ROOT = getcwd ();
- chdir ($cwd);
- print "ACE_ROOT not defined, defaulting to ACE_ROOT=$ACE_ROOT\n";
- }
+if ($^O eq "MSWin32") {
+ $tao_ifr = "../../../../../bin/tao_ifr";
+}
+else {
+ $tao_ifr = "../../../IFR_Service/tao_ifr";
}
-use lib "$ACE_ROOT/bin";
+$TAO_IFR = new PerlACE::Process ($tao_ifr);
+$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service");
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client", "-ORBInitRef InterfaceRepository=file://$ifr_iorfile");
-ACE::checkForTarget($cwd);
+unlink $ifr_iorfile;
+unlink $svr_iorfile;
-$if_repo_service = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR."IFR_Service".$DIR_SEPARATOR.
- "IFR_Service".$EXE_EXT;
+$IFR->Spawn ();
+if (PerlACE::waitforfile_timed ($ifr_iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$ifr_iorfile>\n";
+ $IFR->Kill ();
+ exit 1;
+}
-$init_ref =
- "-ORBInitRef InterfaceRepository=file://if_repo.ior";
+$SV->Spawn ();
-if ($^O eq "MSWin32") {
- ### It is in the path
- $tao_ifr = "tao_ifr".$EXE_EXT;
-}
-else {
- $tao_ifr = "$ACE_ROOT/TAO/orbsvcs/IFR_Service/tao_ifr".$EXE_EXT;
+if (PerlACE::waitforfile_timed ($svr_iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$svr_iorfile>\n";
+ $IFR->Kill ();
+ $SV->Kill ();
+ exit 1;
}
-$ifr_iorfile = "$cwd$DIR_SEPARATOR" . "if_repo.ior";
-$svr_iorfile = "$cwd$DIR_SEPARATOR" . "iorfile";
+$TAO_IFR->Arguments ($test_idl);
-unlink $ifr_iorfile;
-unlink $svr_iorfile;
+$tresult = $TAO_IFR->SpawnWaitKill (30);
-$IFR = Process::Create ($if_repo_service);
+if ($tresult != 0) {
+ print STDERR "ERROR: tao_ifr (test.idl) returned $tresult\n";
+ $status = 1;
+}
+
+$client = $CL->SpawnWaitKill (60);
-if (ACE::waitforfile_timed ($ifr_iorfile, 15) == -1)
-{
- print STDERR "ERROR: cannot find file <$ifr_iorfile>\n";
- $IFR->Kill ();
- $IFR->TimedWait (1);
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT);
+$server = $SV->TerminateWaitKill (5);
-if (ACE::waitforfile_timed ($svr_iorfile, 15) == -1)
-{
- print STDERR "ERROR: cannot find file <$svr_iorfile>\n";
- $SV->Kill ();
- $SV->TimedWait (1);
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-system ($tao_ifr." test.idl");
+$TAO_IFR->Arguments ("-r $test_idl");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- " $init_ref");
+$tresult = $TAO_IFR->SpawnWaitKill (30);
-$client = $CL->TimedWait (60);
-if ($client == -1)
-{
- print STDERR "ERROR: client timedout\n";
- $CL->Kill ();
- $CL->TimedWait (1);
+if ($tresult != 0) {
+ print STDERR "ERROR: tao_ifr (-r test.idl) returned $tresult\n";
+ $status = 1;
}
-$SV->Kill ();
-$SV->TimedWait (1);
+$server = $IFR->TerminateWaitKill (5);
-system ($tao_ifr." -r test.idl");
-
-$IFR->Kill ();
-$IFR->TimedWait (1);
+if ($server != 0) {
+ print STDERR "ERROR: IFR returned $server\n";
+ $status = 1;
+}
unlink $ifr_iorfile;
unlink $svr_iorfile;
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl
index bf81ece0806..03b00dcb3fb 100755
--- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl
@@ -6,82 +6,66 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../../bin";
-
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+use PerlACE::Run_Test;
$locking = "-m";
-$if_repo_server = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR."IFR_Service".$DIR_SEPARATOR.
- "IFR_Service".$EXE_EXT, " $locking";
-
-
-$init_ref =
- "-ORBInitRef InterfaceRepository=file://if_repo.ior";
+$iorfile = "if_repo.ior";
-$iorfile = "$cwd$DIR_SEPARATOR" . "if_repo.ior";
+$status = 0;
$debug = "";
$test = "";
$iterations = "";
$other = "";
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-d")
- {
- $debug = "-d";
- last SWITCH;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-d") {
+ $debug = "-d";
}
- if ($ARGV[$i] eq "-t")
- {
- $test = "-t ".$ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-t") {
+ $test = "-t ".$ARGV[$i + 1];
+ $i++;
}
- if ($ARGV[$i] eq "-i")
- {
- $iterations = "-i ".$ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-i") {
+ $iterations = "-i ".$ARGV[$i + 1];
+ $i++;
+ }
+ else {
+ $other .= $ARGV[$i];
}
- $other .= $ARGV[$i];
- }
}
unlink $iorfile;
-$SV = Process::Create ($if_repo_server);
+$SV = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " $locking");
+$CL = new PerlACE::Process ("IFR_Test",
+ "-ORBInitRef InterfaceRepository=file://$iorfile"
+ . " $debug $test $iterations");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1)
-{
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
- $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."IFR_Test".$EXE_EXT,
- " $init_ref $debug $test $iterations");
+$client = $CL->SpawnWaitKill (60);
-$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;
}
-$SV->Kill ();
-$SV->TimedWait (1);
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
unlink $iorfile;
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
index 3d569d52833..f6f3fd38b8f 100755
--- a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
@@ -6,103 +6,92 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../../bin";
-
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+use PerlACE::Run_Test;
$persistent = "-p";
-$ifr_service = $EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR."IFR_Service".$DIR_SEPARATOR.
- "IFR_Service".$EXE_EXT, " $persistent";
+$status = 0;
-$init_ref =
- "-ORBInitRef InterfaceRepository=file://if_repo.ior";
+$iorfile = "if_repo.ior";
+$backing_file = PerlACE::LocalFile ("ifr_default_backing_store");
-$iorfile = "$cwd$DIR_SEPARATOR" . "if_repo.ior";
-$backing_file = "$cwd$DIR_SEPARATOR" . "ifr_default_backing_store";
+$init_ref = "-ORBInitRef InterfaceRepository=file://$iorfile";
$debug = "";
$query_opt = "-q";
$other = "";
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-d")
- {
- $debug = "-d";
- last SWITCH;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-d") {
+ $debug = "-d";
+ }
+ else {
+ $other .= $ARGV[$i];
}
- $other .= $ARGV[$i];
- }
}
unlink $iorfile;
unlink $backing_file;
-print "\t IFR Persistence Test\n\n";
+print STDERR "\t IFR Persistence Test\n\n";
+
+$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", $persistent);
+$T = new PerlACE::Process ("Persistence_Test");
-$NEW_IFR = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR."IFR_Service".$DIR_SEPARATOR.
- "IFR_Service".$EXE_EXT, " $persistent");
+$IFR->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1)
-{
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $NEW_IFR->Kill ();
- $NEW_IFR->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $IFR->Kill ();
+ exit 1;
}
-$POPULATE = Process::Create ($EXEPREFIX."Persistence_Test".$EXE_EXT,
- " $init_ref");
+$T->Arguments ($init_ref);
-$populate = $POPULATE->TimedWait (60);
-if ($populate == -1)
-{
- print STDERR "ERROR: populate timedout\n";
- $POPULATE->Kill ();
- $POPULATE->TimedWait (1);
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: populate test returned $test\n";
+ $status = 1;
}
-$NEW_IFR->Kill ();
-$NEW_IFR->TimedWait (1);
+$server = $IFR->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: IFR returned $server\n";
+ $status = 1;
+}
unlink $iorfile;
-$FILE_IFR = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR."IFR_Service".$DIR_SEPARATOR.
- "IFR_Service".$EXE_EXT, " $persistent");
+$IFR->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1)
-{
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $FILE_IFR->Kill ();
- $FILE_IFR->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $IFR->Kill ();
+ exit 1;
}
-$QUERY = Process::Create ($EXEPREFIX."Persistence_Test".$EXE_EXT,
- " $init_ref $debug $query_opt");
+$T->Arguments ("$init_ref $debug $query_opt");
-$query = $QUERY->TimedWait (60);
-if ($query == -1)
-{
- print STDERR "ERROR: query timedout\n";
- $QUERY->Kill ();
- $QUERY->TimedWait (1);
+
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: query test returned $test\n";
+ $status = 1;
}
-$FILE_IFR->Kill ();
-$FILE_IFR->TimedWait (1);
-#unlink $iorfile;
-#unlink $backing_file;
+$server = $IFR->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: IFR returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+unlink $backing_file;
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/Interoperable_Naming/client.dsp b/TAO/orbsvcs/tests/Interoperable_Naming/client.dsp
index 235c71addd6..788203c5f3f 100644
--- a/TAO/orbsvcs/tests/Interoperable_Naming/client.dsp
+++ b/TAO/orbsvcs/tests/Interoperable_Naming/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/orbsvcs/tests/Interoperable_Naming/run_test.pl b/TAO/orbsvcs/tests/Interoperable_Naming/run_test.pl
index 0e33c0d7dc5..12b26792aa8 100755
--- a/TAO/orbsvcs/tests/Interoperable_Naming/run_test.pl
+++ b/TAO/orbsvcs/tests/Interoperable_Naming/run_test.pl
@@ -8,12 +8,8 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a perl script that runs the NamingContextExt test. It starts
# the Naming service, server and the client as necessary
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd ();
+use lib '../../../../bin';
+use PerlACE::Run_Test;
# Amount of delay (in seconds) between starting a server and a client
# to allow proper server initialization.
@@ -21,58 +17,38 @@ $sleeptime = 8;
# Variables for command-line arguments to client and server
# executables
-$iorfile = "$cwd$DIR_SEPARATOR" . "ns.ior";
+$iorfile = PerlACE::LocalFile ("ns.ior");
-ACE::checkForTarget($cwd);
+# Run the server and client for the test.
-sub name_server
- {
- my $args = "@_"." -o $iorfile";
- my $prog = $EXEPREFIX."..$DIR_SEPARATOR..$DIR_SEPARATOR..$DIR_SEPARATOR".
- "orbsvcs".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT;
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-s -ORBInitRef NameService=file://$iorfile");
- # Make sure the files are gone, so we can wait on them.
- unlink $iorfile;
+# Make sure the files are gone, so we can wait on them.
+unlink $iorfile;
- $NS = Process::Create ($prog, $args);
+$NS->Spawn ();
- if (ACE::waitforfile_timed ($iorfile, $sleeptime) == -1)
- {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
- }
+if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
+ print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
+ $NS->Kill ();
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (60);
-sub client
- {
- my $args = "@_"." ";
- my $prog = $EXEPREFIX."client".$EXE_EXT;
-
- $CL = Process::Create ($prog, $args);
-
- $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;
+}
-# Options for all the tests recognized by the 'client' program
-$opts = "-s -ORBInitRef NameService=file://$iorfile";
+$nserver = $NS->TerminateWaitKill (5);
-# Run the server and client for the test.
-#
-name_server ();
-client ($opts);
+if ($nserver != 0) {
+ print STDERR "ERROR: server returned $nserver\n";
+ $status = 1;
+}
-$NS->Terminate (); $server = $NS->TimedWait (5);
-if ($server == -1)
- {
- print STDERR "ERROR: server timedout\n";
- $NS->Kill (); $NS->TimedWait (1);
- }
+unlink $iorfile;
-exit 0;
+exit $status;
diff --git a/TAO/orbsvcs/tests/LoadBalancing/client.dsp b/TAO/orbsvcs/tests/LoadBalancing/client.dsp
index 75b0af27416..dd4d5cf6317 100644
--- a/TAO/orbsvcs/tests/LoadBalancing/client.dsp
+++ b/TAO/orbsvcs/tests/LoadBalancing/client.dsp
@@ -137,6 +137,8 @@ SOURCE=.\Hash_Replica.idl
!IF "$(CFG)" == "LoadBalancing client - Win32 Release"
+# PROP Ignore_Default_Tool 1
+USERDEP__HASH_="..\..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build
InputPath=.\Hash_Replica.idl
InputName=Hash_Replica
@@ -174,6 +176,8 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "LoadBalancing client - Win32 Debug"
+# PROP Ignore_Default_Tool 1
+USERDEP__HASH_="..\..\..\..\bin\tao_idl.exe"
# Begin Custom Build
InputPath=.\Hash_Replica.idl
InputName=Hash_Replica
diff --git a/TAO/orbsvcs/tests/LoadBalancing/server.dsp b/TAO/orbsvcs/tests/LoadBalancing/server.dsp
index 61a148ff01e..e1362427374 100644
--- a/TAO/orbsvcs/tests/LoadBalancing/server.dsp
+++ b/TAO/orbsvcs/tests/LoadBalancing/server.dsp
@@ -137,6 +137,8 @@ SOURCE=.\Hash_Replica.idl
!IF "$(CFG)" == "LoadBalancing server - Win32 Release"
+# PROP Ignore_Default_Tool 1
+USERDEP__HASH_="..\..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build
InputPath=.\Hash_Replica.idl
InputName=Hash_Replica
@@ -174,6 +176,8 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "LoadBalancing server - Win32 Debug"
+# PROP Ignore_Default_Tool 1
+USERDEP__HASH_="..\..\..\..\bin\tao_idl.exe"
# Begin Custom Build
InputPath=.\Hash_Replica.idl
InputName=Hash_Replica
diff --git a/TAO/orbsvcs/tests/Property/run_test.pl b/TAO/orbsvcs/tests/Property/run_test.pl
index 56e731ac912..d66bbd712a2 100755
--- a/TAO/orbsvcs/tests/Property/run_test.pl
+++ b/TAO/orbsvcs/tests/Property/run_test.pl
@@ -5,81 +5,60 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
# amount of delay between running the servers
$sleeptime = 6;
$status = 0;
-ACE::checkForTarget($cwd);
-
# variables for parameters
-$nsior = "$cwd$DIR_SEPARATOR" . "ns.ior";
-
-sub name_server
-{
- my $args = " -o $nsior";
- my $prog =
- print STDERR ("\nNaming_Service: $args\n");
-
- unlink $nsior;
- $NS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR
- ."..".$DIR_SEPARATOR
- ."Naming_Service".$DIR_SEPARATOR
- ."Naming_Service".$EXE_EXT, $args);
- if (ACE::waitforfile_timed ($nsior, 5) == -1) {
- print STDERR "ERROR: cannot find naming service IOR file\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
+$nsior = PerlACE::LocalFile ("ns.ior");
+unlink $nsior;
-sub server
-{
- my $args = "-ORBInitRef NameService=file://$nsior";
- print STDERR "\nServer $args\n";
- $SV = Process::Create ($EXEPREFIX."server$EXE_EXT", $args);
-}
+$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $nsior");
+$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior");
+$CL = new PerlACE::Process ("client", "-ORBInitRef NameService=file://$nsior");
+print STDERR "Starting Naming_Service\n";
+$NS->Spawn ();
-sub client
-{
- my $args = "-ORBInitRef NameService=file://$nsior";
- print STDERR "\nclient $args\n";
- $CL = Process::Create ($EXEPREFIX."client$EXE_EXT", $args);
+if (PerlACE::waitforfile_timed ($nsior, 5) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill ();
+ exit 1;
}
-name_server ();
+print STDERR "Starting Server\n";
+$SV->Spawn ();
-server ();
sleep $sleeptime;
-client ();
+print STDERR "Starting Client\n";
+
-if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client";
+ $status = 1;
}
-$SV->Terminate (); if ($SV->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate server\n";
- $SV->Kill (); $SV->TimedWait (1);
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server";
+ $status = 1;
}
-$NS->Terminate (); if ($NS->TimedWait (5) == -1) {
- print STDERR "ERROR: cannot terminate naming service\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$nserver = $NS->TerminateWaitKill (5);
+
+if ($nserver != 0) {
+ print STDERR "ERROR: name server returned $nserver";
+ $status = 1;
}
exit $status;
diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.dsp b/TAO/orbsvcs/tests/Simple_Naming/client.dsp
index 27428053174..9c0e253ea70 100644
--- a/TAO/orbsvcs/tests/Simple_Naming/client.dsp
+++ b/TAO/orbsvcs/tests/Simple_Naming/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/orbsvcs/tests/Simple_Naming/process-m-output.pl b/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl
index ab8a0ec9b73..d962113c0ae 100755
--- a/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl
+++ b/TAO/orbsvcs/tests/Simple_Naming/process-m-output.pl
@@ -4,10 +4,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
-unshift @INC, '../../../../bin';
-require Process;
-require Uniqueid;
-
# This is a Perl script that processes the output of the multithreaded
# client test. Usage: process-m-output.pl output-file-name number-of-threads
@@ -30,6 +26,8 @@ else
die "Usage: process-m-output.pl output-file-name number-of-threads \n";
}
+$errors = 0;
+
$binds = 0;
$unbinds = 0;
@@ -105,3 +103,5 @@ else
print "Number of sucessfule binds is different from number of
sucessful unbinds\n";
}
+
+exit $errors;
diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
index a9ea5e590a9..4e5870dad99 100755
--- a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
+++ b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
@@ -8,57 +8,62 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl script that runs all Naming Service tests. It starts
# all the servers and clients as necessary.
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-require Uniqueid;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
# Amount of delay (in seconds) between starting a server and a client
# to allow proper server initialization.
$sleeptime = 8;
+$quiet = 0;
+
+# check for -q flag
+if ($ARGV[0] eq '-q') {
+ $quiet = 1;
+}
+
# Variables for command-line arguments to client and server
# executables.
-$ns_multicast_port = 10001 + uniqueid (); # Can not be 10000 on Chorus 4.0
-$ns_orb_port = 12000 + uniqueid ();
-$iorfile = "$cwd$DIR_SEPARATOR" . "ns.ior";
-$persistent_ior_file = "$cwd$DIR_SEPARATOR" . "pns.ior";
-$persistent_log_file = "$cwd$DIR_SEPARATOR" . "test_log";
-$data_file = "$cwd$DIR_SEPARATOR" . "test_run.data";
+$ns_multicast_port = 10001 + PerlACE::uniqueid (); # Can not be 10000 on Chorus 4.0
+$ns_orb_port = 12000 + PerlACE::uniqueid ();
+$iorfile = PerlACE::LocalFile ("ns.ior");
+$persistent_ior_file = PerlACE::LocalFile ("pns.ior");
+$persistent_log_file = PerlACE::LocalFile ("test_log");
+$data_file = PerlACE::LocalFile ("test_run.data");
-ACE::checkForTarget($cwd);
+$status = 0;
sub name_server
{
- my $args = "@_ "."-ORBnameserviceport $ns_multicast_port -o $iorfile";
- my $prog = $EXEPREFIX."..$DIR_SEPARATOR..$DIR_SEPARATOR".
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT;
-
- unlink $iorfile;
- $NS = Process::Create ($prog, $args);
-
- if (ACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
+ my $args = "@_ "."-ORBnameserviceport $ns_multicast_port -o $iorfile";
+ my $prog = "../../Naming_Service/Naming_Service";
+
+ $NS = new PerlACE::Process ($prog, $args);
+
+ unlink $iorfile;
+
+ $NS->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
+ print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
+ $NS->Kill ();
+ exit 1;
+ }
}
sub client
{
- my $args = "@_"." ";
- my $prog = $EXEPREFIX."client".$EXE_EXT;
+ my $args = "@_"." ";
+ my $prog = "client";
- $CL = Process::Create ($prog, $args);
+ $CL = new PerlACE::Process ($prog, $args);
- $client = $CL->TimedWait (60);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
+ $client = $CL->SpawnWaitKill (60);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
}
# Options for all simple tests recognized by the 'client' program.
@@ -90,20 +95,15 @@ unlink $persistent_ior_file, $persistent_log_file;
# Run server and client for each of the tests. Client uses ior in a
# file to bootstrap to the server.
-foreach $o (@opts)
-{
- name_server ($server_opts[$test_number]);
+foreach $o (@opts) {
+ name_server ($server_opts[$test_number]);
- print STDERR "\n ".$comments[$test_number];
+ print STDERR "\n ".$comments[$test_number];
- client ($o);
+ client ($o);
- $NS->Terminate (); $server = $NS->TimedWait (5);
- if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $NS->Kill (); $NS->TimedWait (1);
- }
- $test_number++;
+ $NS->Kill ();
+ $test_number++;
}
unlink $persistent_ior_file, $persistent_log_file;
@@ -117,6 +117,10 @@ open (STDOUT, ">$data_file") or die "can't redirect stdout: $!";
open (OLDERR, ">&STDERR");
open (STDERR, ">&STDOUT") or die "can't redirect stderror: $!";
+# just here to quiet warnings
+$fh = \*OLDOUT;
+$fh = \*OLDERR;
+
name_server ();
client ("-ORBInitRef NameService=file://$iorfile", "-m15");
@@ -126,22 +130,31 @@ close (STDOUT);
open (STDOUT, ">&OLDOUT");
open (STDERR, ">&OLDERR");
-$NS->Terminate (); $server = $NS->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $NS->Kill (); $NS->TimedWait (1);
-}
+$NS->Kill ();
unlink $iorfile;
-$FL = Process::Create ($EXEPREFIX."process-m-output.pl",
- " $data_file 15");
-$filter = $FL->TimedWait (60);
-if ($filter == -1) {
- print STDERR "ERROR: filter timedout\n";
- $FL->Kill (); $FL->TimedWait (1);
+
+$errors = system ("perl process-m-output.pl $data_file 15") >> 8;
+
+if ($errors > 0) {
+ $status = 1;
+
+ if (!$quiet) {
+ print STDERR "Errors Detected, printing output\n";
+ if (open (DATA, "<$data_file")) {
+ print STDERR "================================= Begin\n";
+ print STDERR <DATA>;
+ print STDERR "================================= End\n";
+ close (DATA);
+ }
+ else {
+ print STDERR "ERROR: Could not open $data_file\n";
+ }
+ unlink $data_file;
+ }
}
-print STDERR "\n";
-# @@ Capture any exit status from the processes.
-exit 0;
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Time/run_test.pl b/TAO/orbsvcs/tests/Time/run_test.pl
index c722b9167f4..9c174e5f654 100755
--- a/TAO/orbsvcs/tests/Time/run_test.pl
+++ b/TAO/orbsvcs/tests/Time/run_test.pl
@@ -6,134 +6,59 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../../bin";
+use PerlACE::Run_Test;
-require ACEutils;
-use Cwd;
+$server_ior = PerlACE::LocalFile ("server_ior");
+$clerk_ior = PerlACE::LocalFile ("clerk_ior");
-$cwd = getcwd();
-$server_ior = "$cwd$DIR_SEPARATOR" . "server_ior";
-$clerk_ior = "$cwd$DIR_SEPARATOR" . "clerk_ior";
-$implrepo_ior = "$cwd$DIR_SEPARATOR" . "implrepo.ior";
$status = 0;
# Make sure the files are gone, so we can wait on them.
-unlink $server_ior;
-unlink $clerk_ior;
+unlink $server_ior, $clerk_ior;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("../../Time_Service/Time_Service_Server", "-o $server_ior");
+$CK = new PerlACE::Process ("../../Time_Service/Time_Service_Clerk", "-f $server_ior -o $clerk_ior -t 2");
+$CL = new PerlACE::Process ("client", "-f $clerk_ior");
-$server_program = $EXEPREFIX."..$DIR_SEPARATOR..$DIR_SEPARATOR"."Time_Service".$DIR_SEPARATOR."Time_Service_Server".$EXE_EXT;
-$clerk_program = $EXEPREFIX."..$DIR_SEPARATOR..$DIR_SEPARATOR"."Time_Service".$DIR_SEPARATOR."Time_Service_Clerk".$EXE_EXT;
-$client_program = $EXEPREFIX."client".$EXE_EXT;
+$SV->Spawn ();
-sub time_service_test_using_naming_service
-{
- $SV1 = Process::Create ($server_program,"");
-
- sleep 5;
+if (PerlACE::waitforfile_timed ($server_ior, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$server_ior>\n";
+ $SV->Kill ();
+ exit 1;
+}
- $SV2 = Process::Create ($clerk_program,"-t 2");
+$CK->Spawn ();
- sleep 10;
+if (PerlACE::waitforfile_timed ($clerk_ior, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$clerk_ior>\n";
+ $SV->Kill ();
+ $CK->Kill ();
+ exit 1;
+}
- $CL = Process::Create ($client_program, "");
-
- if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
- }
+$client = $CL->SpawnWaitKill (60);
- $SV1->Terminate ();
- $SV2->Terminate ();
- if ($SV1->TimedWait (5) == -1 ||
- $SV2->TimedWait (5) == -1) {
- print STDERR "ERROR: couldn't shutdown the servers nicely\n";
- $status = 1;
- $SV1->Kill (); $SV2->Kill ();
- $SV1->TimedWait (1); $SV2->TimedWait (1);
- }
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-sub time_service_test_using_files
-{
- $SV1 = Process::Create ($server_program,
- "-o $server_ior");
-
- if (ACE::waitforfile_timed ($server_ior, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$server_ior>\n";
- $status = 1;
- $SV1->Kill (); $SV1->TimedWait (1);
- }
- else {
-
- sleep 5;
-
- $SV2 = Process::Create ($clerk_program,
- "-f $server_ior -o $clerk_ior -t 2");
-
- if (ACE::waitforfile_timed ($clerk_ior, 15) == -1) {
- print STDERR "ERROR: timedout waiting for file <$clerk_ior>\n";
- $status = 1;
- $SV2->Kill (); $SV2->TimedWait (1);
- }
- else {
-
- sleep 10;
-
- $CL = Process::Create ($client_program,
- " -f $clerk_ior");
- if ($CL->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $CL->Kill (); $CL->TimedWait (1);
- }
-
- $SV1->Terminate ();
- $SV2->Terminate ();
- if ($SV1->TimedWait (5) == -1 ||
- $SV2->TimedWait (5) == -1) {
- print STDERR "ERROR: couldn't shutdown the servers nicely\n";
- $status = 1;
- $SV1->Kill (); $SV2->Kill ();
- $SV1->TimedWait (1); $SV2->TimedWait (1);
- }
- }
- }
- unlink $clerk_ior;
- unlink $server_ior;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-# Parse the arguments
-
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "run_test [-chorus <target>] <use_naming> or <use_files>\n";
- print "\n";
- print "-chorus <target> -- Run the test on the Chorus target\n";
- print "use_naming -- Runs the test using Naming Service\n";
- print "use_files -- Runs the test using IOR Files\n";
- exit;
- }
-
- if ($ARGV[$i] eq "use_naming")
- {
- time_service_test_using_naming_service ();
- last SWITCH;
- }
-
- if ($ARGV[$i] eq "use_files")
- {
- time_service_test_using_files ();
- last SWITCH;
- }
- print "run_test: Unknown Option: ".$ARGV[$i]."\n";
- }
+$clerk = $CK->TerminateWaitKill (5);
+
+if ($clerk != 0) {
+ print STDERR "ERROR: clerk returned $clerk\n";
+ $status = 1;
}
+unlink $server_ior, $clerk_ior;
+
exit $status;
diff --git a/TAO/orbsvcs/tests/Trading/Colocated_Test.dsp b/TAO/orbsvcs/tests/Trading/Colocated_Test.dsp
index 27afea15f35..b30b280888e 100644
--- a/TAO/orbsvcs/tests/Trading/Colocated_Test.dsp
+++ b/TAO/orbsvcs/tests/Trading/Colocated_Test.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/orbsvcs/tests/Trading/Export_Test.dsp b/TAO/orbsvcs/tests/Trading/Export_Test.dsp
index eb5550928ca..f4a76f9f3f9 100644
--- a/TAO/orbsvcs/tests/Trading/Export_Test.dsp
+++ b/TAO/orbsvcs/tests/Trading/Export_Test.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/orbsvcs/tests/Trading/Import_Test.dsp b/TAO/orbsvcs/tests/Trading/Import_Test.dsp
index 2b13596987a..43433d60623 100644
--- a/TAO/orbsvcs/tests/Trading/Import_Test.dsp
+++ b/TAO/orbsvcs/tests/Trading/Import_Test.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/orbsvcs/tests/Trading/TradingLib.dsp b/TAO/orbsvcs/tests/Trading/TradingLib.dsp
index 776512d4b34..9fa80964dd8 100644
--- a/TAO/orbsvcs/tests/Trading/TradingLib.dsp
+++ b/TAO/orbsvcs/tests/Trading/TradingLib.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 Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
diff --git a/TAO/orbsvcs/tests/Trading/run_test.pl b/TAO/orbsvcs/tests/Trading/run_test.pl
index e557bdb3ddc..2ee0d0dce60 100755
--- a/TAO/orbsvcs/tests/Trading/run_test.pl
+++ b/TAO/orbsvcs/tests/Trading/run_test.pl
@@ -5,70 +5,50 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-require Process;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$ior = "$cwd$DIR_SEPARATOR" . "trading.ior";
-$ready_file = "$cwd$DIR_SEPARATOR" . "export_test_ready";
+$ior = PerlACE::LocalFile ("trading.ior");
+$ready_file = PerlACE::LocalFile ("export_test_ready");
$sleeptime = 20;
-$status = 0;
unlink $ior;
unlink $ready_file;
-ACE::checkForTarget($cwd);
+$TS = new PerlACE::Process ("../../Trading_Service/Trading_Service",
+ "-TSdumpior $ior");
+$E = new PerlACE::Process ("export_test",
+ "-ORBInitRef TradingService=file://$ior -quiet");
+$I = new PerlACE::Process ("import_test",
+ "-ORBInitRef TradingService=file://$ior -quiet");
-$TS = Process::Create ($EXEPREFIX."..".$DIR_SEPARATOR.
- "..".$DIR_SEPARATOR.
- "Trading_Service".$DIR_SEPARATOR.
- "Trading_Service".$EXE_EXT,
- " -TSdumpior $ior ");
+$TS->Spawn ();
-if (ACE::waitforfile_timed ($ior, $sleeptime) == -1) {
- print STDERR "ERROR: waiting for trading service IOR file\n";
- $TS->Kill (); $TS->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($ior, $sleeptime) == -1) {
+ print STDERR "ERROR: waiting for trading service IOR file\n";
+ $TS->Kill ();
+ exit 1;
}
-$E = Process::Create ($EXEPREFIX."export_test".$EXE_EXT,
- "-ORBInitRef TradingService=file://$ior"
- . " -quiet");
+$E->Spawn ();
-if (ACE::waitforfile_timed ($ready_file, 120) == -1) {
- print STDERR "ERROR: waiting for the export test to finish\n";
- $E->Kill (); $E->TimedWait (1);
- $TS->Kill (); $TS->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($ready_file, 120) == -1) {
+ print STDERR "ERROR: waiting for the export test to finish\n";
+ $E->Kill ();
+ $TS->Kill ();
+ exit 1;
}
-$I = Process::Create ($EXEPREFIX."import_test".$EXE_EXT,
- "-ORBInitRef TradingService=file://$ior"
- . " -quiet");
-
-if ($I->TimedWait (60) == -1) {
- $status = 1;
- print STDERR "ERROR: import test timedout\n";
- $I->Kill (); $I->TimedWait (1);
-}
-
-$E->Terminate ();
-if ($E->TimedWait (15) == -1) {
- $status =1;
- print STDERR "ERROR: export test timedout\n";
- $E->Kill (); $E->TimedWait (1);
-}
-
-$TS->Terminate();
-if ($TS->TimedWait (15) == -1) {
- print STDERR "ERROR: couldn't terminate the trading service nicely\n";
- $TS->Kill (); $TS->TimedWait (1);
- $status = 1;
-}
+$test = $I->SpawnWaitKill (60);
+$E->Kill ();
+$TS->Kill ();
unlink $ior;
unlink $ready_file;
-exit $status;
+if ($test != 0) {
+ print STDERR "ERROR: import test returned $test\n";
+ exit 1;
+}
+
+exit 0;
diff --git a/TAO/tests/AMI/AMI_Test_Client.dsp b/TAO/tests/AMI/AMI_Test_Client.dsp
index d94b2937117..53110d039c3 100644
--- a/TAO/tests/AMI/AMI_Test_Client.dsp
+++ b/TAO/tests/AMI/AMI_Test_Client.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release\client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ELSEIF "$(CFG)" == "AMI_Test_Client - Win32 Debug"
diff --git a/TAO/tests/AMI/AMI_Test_Server.dsp b/TAO/tests/AMI/AMI_Test_Server.dsp
index 5eb7f0ed88a..e2220e0b1c6 100644
--- a/TAO/tests/AMI/AMI_Test_Server.dsp
+++ b/TAO/tests/AMI/AMI_Test_Server.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release\server.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ELSEIF "$(CFG)" == "AMI_Test_Server - Win32 Debug"
diff --git a/TAO/tests/AMI/AMI_Test_Simple_Client.dsp b/TAO/tests/AMI/AMI_Test_Simple_Client.dsp
index 9847d51cafc..19a96e825c8 100644
--- a/TAO/tests/AMI/AMI_Test_Simple_Client.dsp
+++ b/TAO/tests/AMI/AMI_Test_Simple_Client.dsp
@@ -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 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 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"simple_client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Release\simple_client.exe" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao" /libpath:"..\..\..\ace"
!ELSEIF "$(CFG)" == "AMI_Test_Simple_Client - Win32 Debug"
diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl
index 05f46bc9ea3..e1f43afa343 100755
--- a/TAO/tests/AMI/run_test.pl
+++ b/TAO/tests/AMI/run_test.pl
@@ -5,63 +5,54 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$client_conf="$DIR_SEPARATOR" . "muxed.conf";
-$client_process="simple_client";
-$debug_level='0';
-$threads='2';
-$iterations='1';
+$client_conf = PerlACE::LocalFile ("muxed.conf");
+
+$debug_level = '0';
+$iterations = '1';
-ACE::checkForTarget($cwd);
foreach $i (@ARGV) {
- if ($i eq '-mux') {
- $client_conf = "muxed.conf";
- } elsif ($i eq '-debug') {
- $debug_level = '1';
- } elsif ($i eq '-exclusive') {
- $client_conf = 'exclusive.conf';
- }
+ if ($i eq '-mux') {
+ $client_conf = PerlACE::LocalFile ("muxed.conf");
+ }
+ elsif ($i eq '-debug') {
+ $debug_level = '1';
+ }
+ elsif ($i eq '-exclusive') {
+ $client_conf = PerlACE::LocalFile ('exclusive.conf');
+ }
}
-$iorfile = "server.ior";
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT",
- " -ORBdebuglevel $debug_level"
- . "-d -o $iorfile");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server",
+ "-ORBdebuglevel $debug_level -d -o $iorfile");
-$CL = Process::Create ($EXEPREFIX."$client_process$EXE_EXT",
- " -ORBsvcconf $client_conf "
- . "-ORBdebuglevel $debug_level"
- . " -k file://$iorfile "
- . " -i $iterations -x -d");
+$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, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+$CL = new PerlACE::Process ("simple_client",
+ "-ORBsvcconf $client_conf "
+ . "-ORBdebuglevel $debug_level"
+ . " -k file://$iorfile "
+ . " -i $iterations -x -d");
+
+$client = $CL->SpawnWaitKill (60);
+$server = $SV->WaitKill (5);
unlink $iorfile;
if ($server != 0 || $client != 0) {
- exit 1;
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/AMI_Timeouts/client.dsp b/TAO/tests/AMI_Timeouts/client.dsp
index 2bb15f3ca59..0ef04fc3dd7 100644
--- a/TAO/tests/AMI_Timeouts/client.dsp
+++ b/TAO/tests/AMI_Timeouts/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/tests/AMI_Timeouts/run_test.pl b/TAO/tests/AMI_Timeouts/run_test.pl
index d0ae0e34092..e6596d067a3 100755
--- a/TAO/tests/AMI_Timeouts/run_test.pl
+++ b/TAO/tests/AMI_Timeouts/run_test.pl
@@ -5,47 +5,38 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$client_process="client";
-
-ACE::checkForTarget($cwd);
-
-$iorfile = "server.ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT",
- " -d -o $iorfile");
-if (ACE::waitforfile_timed ($iorfile, 20) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-d -o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT",
- " -k file://$iorfile ");
+$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, 20) == -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 (120);
+$server = $SV->TerminateWaitKill (5);
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-
-exit 0;
-
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+exit $status;
diff --git a/TAO/tests/AMI_Timeouts/server.dsp b/TAO/tests/AMI_Timeouts/server.dsp
index 9fdd07b5c8d..2a1f8d1c205 100644
--- a/TAO/tests/AMI_Timeouts/server.dsp
+++ b/TAO/tests/AMI_Timeouts/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/tests/BiDirectional/run_test.pl b/TAO/tests/BiDirectional/run_test.pl
index 3d55511281a..d448613167e 100755
--- a/TAO/tests/BiDirectional/run_test.pl
+++ b/TAO/tests/BiDirectional/run_test.pl
@@ -5,34 +5,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
$status = 0;
-
-ACE::checkForTarget($cwd);
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile -i 100");
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (20);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile");
+$server = $SV->WaitKill (20);
-$client = $CL->TimedWait (20);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl b/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
index 3d55511281a..ef75660138f 100755
--- a/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
+++ b/TAO/tests/BiDirectional_NestedUpcall/run_test.pl
@@ -5,34 +5,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
$status = 0;
-
-ACE::checkForTarget($cwd);
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile -i 100");
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-o $iorfile -i 100");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile");
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
$client = $CL->TimedWait (20);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/tests/CDR/CDR.dsw b/TAO/tests/CDR/CDR.dsw
index 2758787f3a4..6b32ad7f51e 100644
--- a/TAO/tests/CDR/CDR.dsw
+++ b/TAO/tests/CDR/CDR.dsw
@@ -3,6 +3,30 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
+Project: "CDR Alignment"=.\alignment.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "CDR Allocator"=.\allocator.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "CDR Basic Types"=.\basic_types.dsp - Package Owner=<4>
Package=<5>
diff --git a/TAO/tests/CDR/alignment.dsp b/TAO/tests/CDR/alignment.dsp
new file mode 100644
index 00000000000..6808bcb3dbe
--- /dev/null
+++ b/TAO/tests/CDR/alignment.dsp
@@ -0,0 +1,91 @@
+# Microsoft Developer Studio Project File - Name="CDR Alignment" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=CDR Alignment - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "alignment.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "alignment.mak" CFG="CDR Alignment - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CDR Alignment - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "CDR Alignment - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CDR Alignment - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ace" /libpath:"../../tao"
+
+!ELSEIF "$(CFG)" == "CDR Alignment - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../" /I "../../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../ace" /libpath:"../../tao"
+
+!ENDIF
+
+# Begin Target
+
+# Name "CDR Alignment - Win32 Release"
+# Name "CDR Alignment - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\alignment.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/CDR/allocator.dsp b/TAO/tests/CDR/allocator.dsp
new file mode 100644
index 00000000000..0b852c81342
--- /dev/null
+++ b/TAO/tests/CDR/allocator.dsp
@@ -0,0 +1,91 @@
+# Microsoft Developer Studio Project File - Name="CDR Allocator" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=CDR Allocator - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "allocator.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "allocator.mak" CFG="CDR Allocator - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CDR Allocator - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "CDR Allocator - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CDR Allocator - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../" /I "../../" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ace" /libpath:"../../tao"
+
+!ELSEIF "$(CFG)" == "CDR Allocator - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../" /I "../../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# 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 /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib TAOd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../ace" /libpath:"../../tao"
+
+!ENDIF
+
+# Begin Target
+
+# Name "CDR Allocator - Win32 Release"
+# Name "CDR Allocator - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\allocator.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/TAO/tests/CDR/run_test.pl b/TAO/tests/CDR/run_test.pl
index 0e5ff81a79c..eeaf6f75224 100755
--- a/TAO/tests/CDR/run_test.pl
+++ b/TAO/tests/CDR/run_test.pl
@@ -6,44 +6,31 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-require ACEutils;
-use Cwd;
+use PerlACE::Run_Test;
$brace="\#\#\#\#\#";
%tests = ("basic_types" => "-n 256 -l 10",
- "tc" => "",
- "growth" => "-l 64 -h 256 -s 4 -n 10 -q",
- "alignment" => "",
- "allocator" => "-q");
+ "tc" => "",
+ "growth" => "-l 64 -h 256 -s 4 -n 10 -q",
+ "alignment" => "",
+ "allocator" => "-q");
$test = "";
$args = "";
-$| = 1;
+$status = 0;
print STDERR "\n";
-ACE::checkForTarget(getcwd());
-
-sub run_test
-{
- #my $test = shift (@tests);
- #my $args = shift (@argslist);
-
+while (($test,$args) = each %tests) {
print STDERR "\n$brace $test $args test BEGUN\n";
- $TST = Process::Create ($EXEPREFIX."$test".$EXE_EXT,
- "$args");
- print STDERR "\t$test RUNNING\n";
- $retval = $TST->TimedWait (90);
- if ($retval == -1) {
- print STDERR "ERROR $brace $test $args TIMEOUT\n";
- $TST->Kill (); $TST->TimedWait (5);
- } elsif ($retval != 0) {
- print STDERR "ERROR $brace $test $args, exit value $retval\n";
+ $TST = new PerlACE::Process ($test, $args);
+ print STDERR "\tRUNNING $test\n";
+
+ $retval = $TST->SpawnWaitKill (90);
+
+ if ($retval != 0) {
+ print STDERR "ERROR $brace $test $args, exit value $retval\n";
+ $status = 1;
}
print STDERR "$brace $test FINISHED successfully\n";
}
-while (($test,$args) = each %tests)
-{
- run_test ($test, $args);
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/Codec/run_test.pl b/TAO/tests/Codec/run_test.pl
index c4dcd2082cb..16c1b3ddd8f 100755
--- a/TAO/tests/Codec/run_test.pl
+++ b/TAO/tests/Codec/run_test.pl
@@ -5,24 +5,18 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
# $Id$
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+use lib '../../../bin';
+use PerlACE::Run_Test;
print STDERR "\n\n==== Running Codec test\n";
-$codec = Process::Create ($EXEPREFIX."client".$EXE_EXT);
+$T = new PerlACE::Process ("client");
-$pid = $codec->TimedWait (15);
-if ($pid == -1) {
- print STDERR "ERROR: Codec timed out\n";
- $codec->Kill (); $codec->TimedWait (1);
+$test = $T->SpawnWaitKill (15);
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: Codec test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/Connection_Purging/run_test.pl b/TAO/tests/Connection_Purging/run_test.pl
index 6917af2b8d3..6eeb1cdd5ab 100755
--- a/TAO/tests/Connection_Purging/run_test.pl
+++ b/TAO/tests/Connection_Purging/run_test.pl
@@ -5,23 +5,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("Connection_Purging", "-ORBCollocation no");
-$T = Process::Create ($EXEPREFIX."Connection_Purging".$EXE_EXT." -ORBCollocation no");
+$client = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/DSI_Gateway/run_test.pl b/TAO/tests/DSI_Gateway/run_test.pl
index 8f23c17c497..a455f66c991 100755
--- a/TAO/tests/DSI_Gateway/run_test.pl
+++ b/TAO/tests/DSI_Gateway/run_test.pl
@@ -5,66 +5,60 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$svfile = PerlACE::LocalFile ("server.ior");
+$gwfile = PerlACE::LocalFile ("gateway.ior");
-$svfile = "$cwd$DIR_SEPARATOR" . "server.ior";
unlink $svfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $svfile");
+unlink $gwfile;
+
+$status = 0;
+
+$SV = new PerlACE::Process ("server", "-o $svfile");
+$GW = new PerlACE::Process ("gateway", "-k file://$svfile -o $gwfile");
+$CL = new PerlACE::Process ("client", "-k file://$gwfile -x -i 100");
-if (ACE::waitforfile_timed ($svfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$svfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($svfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$svfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$gwfile = "$cwd$DIR_SEPARATOR" . "gateway.ior";
-unlink $gwfile;
-$GW = Process::Create ($EXEPREFIX."gateway$EXE_EXT ",
- " -k file://$svfile"
- . " -o $gwfile");
-
-if (ACE::waitforfile_timed ($gwfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$gwfile>\n";
- $GW->Kill (); $GW->TimedWait (1);
- exit 1;
+$GW->Spawn ();
+
+if (PerlACE::waitforfile_timed ($gwfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$gwfile>\n";
+ $SV->Kill ();
+ $GW->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$gwfile -x"
- . " -i 100");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
}
-$gateway = $GW->TimedWait (5);
-if ($gateway == -1) {
- print STDERR "ERROR: server timedout\n";
- $GW->Kill (); $GW->TimedWait (1);
+$gateway = $GW->WaitKill (5);
+
+if ($gateway != 0) {
+ print STDERR "ERROR: gateway returned $gateway\n";
+ $status = 1;
}
unlink $svfile;
unlink $gwfile;
-if ($server != 0
- || $gateway != 0
- || $client != 0) {
- print STDERR "ERROR: test failed <$server,$gateway,$client>\n";
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/DynAny_Test/basic_test.dsp b/TAO/tests/DynAny_Test/basic_test.dsp
index 435bb922381..49242184dda 100644
--- a/TAO/tests/DynAny_Test/basic_test.dsp
+++ b/TAO/tests/DynAny_Test/basic_test.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/tests/DynAny_Test/run_test.pl b/TAO/tests/DynAny_Test/run_test.pl
index 0b19dde15c1..cb372010f44 100755
--- a/TAO/tests/DynAny_Test/run_test.pl
+++ b/TAO/tests/DynAny_Test/run_test.pl
@@ -6,66 +6,50 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-require ACEutils;
-require Process;
-use Cwd;
+use PerlACE::Run_Test;
+$status = 0;
$type = "";
sub run_test
{
- my $type = shift(@_);
-
- $BT = Process::Create ($EXEPREFIX."basic_test".$EXE_EXT,
- " -t $type");
-
- $test = $BT->TimedWait (10);
- if ($test == -1) {
- print STDERR "ERROR: test timedout\n";
- $BT->Kill (); $BT->TimedWait (1);
- }
-
+ my $type = shift(@_);
+
+ $BT = new PerlACE::Process ("basic_test", "-t $type");
+ my $basictest = $BT->SpawnWaitKill (10);
+
+ if ($basictest != 0) {
+ print STDERR "ERROR: basic test for ($type) returned $basictest\n";
+ $status = 1;
+ }
}
-# Parse the arguments
-ACE::checkForTarget(getcwd());
-
-for ($i = 0; $i <= $#ARGV; $i++)
-{
- SWITCH:
- {
- if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?")
- {
- print "Run_Test Perl script for TAO DynAny Test\n\n";
- print "run_test [-chorus <target>] [-t type]\n";
- print "\n";
- print "-t type -- runs only one type of dynany test\n";
- exit;
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "Run_Test Perl script for TAO DynAny Test\n\n";
+ print "run_test [-chorus <target>] [-t type]\n";
+ print "\n";
+ print "-t type -- runs only one type of dynany test\n";
+ exit;
}
- if ($ARGV[$i] eq "-t")
- {
- $type = $ARGV[$i + 1];
- $i++;
- last SWITCH;
+ elsif ($ARGV[$i] eq "-t") {
+ $type = $ARGV[$i + 1];
+ $i++;
}
- }
}
@types = ("dynany", "dynarray", "dynenum", "dynsequence", "dynstruct",
"dynunion");
-
-if ($type ne "")
-{
- run_test ($type);
-}
-else
-{
- foreach $type (@types)
- {
+if ($type ne "") {
run_test ($type);
- }
+}
+else {
+ foreach $type (@types) {
+ run_test ($type);
+ }
}
+exit $status;
diff --git a/TAO/tests/Endpoint_Per_Priority/run_test.pl b/TAO/tests/Endpoint_Per_Priority/run_test.pl
index 32243503eb3..55e25503fb7 100755
--- a/TAO/tests/Endpoint_Per_Priority/run_test.pl
+++ b/TAO/tests/Endpoint_Per_Priority/run_test.pl
@@ -5,58 +5,57 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
+
+$client_conf = PerlACE::LocalFile ("client.conf");
+$server_conf = PerlACE::LocalFile ("server.conf");
+$iorfile = PerlACE::LocalFile ("test.ior");
-$cwd = getcwd();
-$client_conf="$cwd$DIR_SEPARATOR" . "client.conf";
-$server_conf="$cwd$DIR_SEPARATOR" . "server.conf";
$threads='2';
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+
+unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server",
+ "-ORBSvcConf $server_conf"
+ . " -ORBEndPoint iiop://localhost:0/priority=0 "
+ . " -ORBEndPoint iiop://localhost:0/priority=1 "
+ . " -ORBEndPoint iiop://localhost:0/priority=2 "
+ . " -ORBEndPoint iiop://localhost:0/priority=3 "
+ . " -ORBEndPoint iiop://localhost:0/priority=4 "
+ . " -o $iorfile -n $threads");
+
+$CL = new PerlACE::Process ("client",
+ "-ORBSvcConf $client_conf "
+ . " -k file://$iorfile "
+ . " -t 0 -t 1 -i 1000");
print STDERR "================ Multi-threaded test\n";
-unlink $iorfile;
+$SV->Spawn ();
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -ORBSvcConf $server_conf"
- . " -ORBEndPoint iiop://$TARGETHOSTNAME:0/priority=0 "
- . " -ORBEndPoint iiop://$TARGETHOSTNAME:0/priority=1 "
- . " -ORBEndPoint iiop://$TARGETHOSTNAME:0/priority=2 "
- . " -ORBEndPoint iiop://$TARGETHOSTNAME:0/priority=3 "
- . " -ORBEndPoint iiop://$TARGETHOSTNAME:0/priority=4 "
- . " -o $iorfile -n $threads");
-
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -ORBSvcConf $client_conf "
- . " -k file://$iorfile "
- . " -t 0 -t 1 -i 1000");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (60);
+$server = $SV->WaitKill (60);
+
if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/Exposed_Policies/run_test.pl b/TAO/tests/Exposed_Policies/run_test.pl
index ac554807b90..3f4a6a204c0 100755
--- a/TAO/tests/Exposed_Policies/run_test.pl
+++ b/TAO/tests/Exposed_Policies/run_test.pl
@@ -10,8 +10,9 @@ require PerlACE::Run_Test;
$poa_file = PerlACE::LocalFile ("POA.cfg");
$obj_file = PerlACE::LocalFile ("Object.cfg");
+$server_conf = PerlACE::LocalFile ("server.conf");
-$SV = new PerlACE::Process ("server", "-ORBSvcConf server.conf"
+$SV = new PerlACE::Process ("server", "-ORBSvcConf $server_conf"
. " -ORBendpoint iiop://localhost:0/priority=5"
. " -ORBendpoint iiop://localhost:0/priority=15"
. " -POAConfigFile $poa_file"
@@ -25,12 +26,18 @@ $SV->Spawn ();
sleep (5);
-if ($CL->SpawnWaitKill (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill ();
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Kill ();
+$server = $SV->TerminateWaitKill (10);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
-exit 0;
+exit $status;
diff --git a/TAO/tests/Faults/run_test.pl b/TAO/tests/Faults/run_test.pl
index b5af007f907..bb2b1df1e61 100755
--- a/TAO/tests/Faults/run_test.pl
+++ b/TAO/tests/Faults/run_test.pl
@@ -5,214 +5,185 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-$middlefile = "$cwd$DIR_SEPARATOR" . "middle.ior";
-$dum_core = "$cwd$DIR_SEPARATOR" . "core";
+use lib '../../../bin';
+use PerlACE::Run_Test;
+
+$iorfile = PerlACE::LocalFile ("test.ior");
+$middlefile = PerlACE::LocalFile ("middle.ior");
+$dum_core = PerlACE::LocalFile ("core");
$status = 0;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "");
+$MD = new PerlACE::Process ("middle", "-o $middlefile -k file://$iorfile");
+$PI = new PerlACE::Process ("ping", "-o $iorfile");
+$PO = new PerlACE::Process ("pong", "-k file://$iorfile -p 100 -i 60 -t 30");
+###############################################################################
print STDERR "===== Base test, no crashes\n";
+
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100");
+$CL->Arguments ("-k file://$iorfile -i 100");
-$client = $CL->TimedWait (20);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (20);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
+###############################################################################
print STDERR "===== Client crash (abort) during upcall\n";
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100 -s");
+$CL->Arguments ("-k file://$iorfile -i 100 -s");
+
+$client = $CL->SpawnWaitKill (20);
-$client = $CL->TimedWait (20);
+# since the client crashes, skip check for $client != 0
if ($client == -1) {
- print STDERR "ERROR: client (-s) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+ $status = 1;
}
+###############################################################################
print STDERR "===== Client crash during upcall\n";
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100 -z");
+$CL->Arguments ("-k file://$iorfile -i 100 -z");
+
+$client = $CL->SpawnWaitKill (20);
-$client = $CL->TimedWait (20);
+# since the client crashes, skip check for $client != 0
if ($client == -1) {
- print STDERR "ERROR: client (-z) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+ $status = 1;
}
+###############################################################################
print STDERR "===== Server crash (abort) during upcall\n";
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100 -a");
+$CL->Arguments ("-k file://$iorfile -i 100 -a");
-$client = $CL->TimedWait (20);
-if ($client == -1) {
- print STDERR "ERROR: client (-a) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (20);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (20);
+$server = $SV->WaitKill (20);
+
+# since the server crashes, skip check for $server != 0
if ($server == -1) {
- print STDERR "ERROR: server (-a) timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+ $status = 1;
}
+###############################################################################
print STDERR "===== Server crash during upcall\n";
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100 -c");
+$CL->Arguments ("-k file://$iorfile -i 100 -c");
-$client = $CL->TimedWait (20);
-if ($client == -1) {
- print STDERR "ERROR: client (-c) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (20);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (20);
+$server = $SV->WaitKill (20);
+
+# since the server crashes, skip check for $server != 0
if ($server == -1) {
- print STDERR "ERROR: server (-c) timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+ $status = 1;
}
+###############################################################################
print STDERR "===== Three-way test, client crashes and server detects\n";
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
unlink $middlefile;
-$MD = Process::Create ($EXEPREFIX."middle$EXE_EXT ",
- " -o $middlefile -k file://$iorfile");
+$MD->Spawn ();
-if (ACE::waitforfile_timed ($middlefile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$middlefile>\n";
- $MD->Kill (); $MD->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($middlefile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$middlefile>\n";
+ $MD->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$middlefile"
- . " -i 100 -s");
+$CL->Arguments ("-k file://$middlefile -i 100 -s");
-$client = $CL->TimedWait (100);
-if ($client == -1) {
- print STDERR "ERROR: client (middle/-s) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (100);
+
+# since the client crashes, skip check for $client != 0
+if ($client != -1) {
+ $status = 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$middlefile"
- . " -i 10 -x");
+$CL->Arguments (" -k file://$middlefile -i 10 -x");
+
+$client = $CL->SpawnWaitKill (100);
-$client = $CL->TimedWait (100);
+# since the client crashes, skip check for $client != 0
if ($client == -1) {
- print STDERR "ERROR: client (middle/-x) timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+ $status = 1;
}
-$server = $SV->TimedWait (20);
-if ($server == -1) {
- print STDERR "ERROR: server (middle/-x) timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
-}
+$server = $SV->WaitKill (20);
-$middle = $MD->TimedWait (20);
-if ($middle == -1) {
- print STDERR "ERROR: middle (-x) timedout\n";
- $MD->Kill (); $MD->TimedWait (1);
- $status = 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
+$middle = $MD->WaitKill (20);
+
if ($middle != 0) {
- print STDERR "ERROR: the middle test failed\n";
- $status = 1;
+ print STDERR "ERROR: the middle test failed, middle returned $middle\n";
+ $status = 1;
}
+###############################################################################
print STDERR "===== Ping-pong test, server crashes but client continues\n";
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."ping$EXE_EXT ",
- " -o $iorfile");
+$PI->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."pong$EXE_EXT ",
- " -k file://$iorfile"
- . " -p 100 -i 60 -t 30");
-
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: pong timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+if ($PO->SpawnWaitKill (60) == -1) {
+ $status = 1;
}
-$server = $SV->TimedWait (60);
-if ($server == -1) {
- print STDERR "ERROR: ping timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+if ($PI->WaitKill (60) == -1) {
+ $status = 1;
}
+
unlink $dum_core;
exit $status;
diff --git a/TAO/tests/Forwarding/run_test.pl b/TAO/tests/Forwarding/run_test.pl
index d6b4a312b91..eb80a33fb00 100755
--- a/TAO/tests/Forwarding/run_test.pl
+++ b/TAO/tests/Forwarding/run_test.pl
@@ -5,72 +5,54 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-$port = ACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-
-ACE::checkForTarget($cwd);
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- "-ORBEndpoint iiop://localhost:".$port
- . " -o $iorfile");
-
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-print STDERR "==== Running first test, using full IORs\n";
+$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
+$status = 0;
-$CL1 = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-i 100 -k file://$iorfile");
+$SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost:$port -o $iorfile");
+$CL1 = new PerlACE::Process ("client", "-i 100 -k file://$iorfile");
+$CL2 = new PerlACE::Process ("client", "-x -i 100 -k corbaloc::localhost:$port/Simple_Server");
-$client1 = $CL1->TimedWait (60);
-if ($client1 == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL1->Kill (); $CL1->TimedWait (1);
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-if ($client2 != 0) {
- print STDERR "ERROR running client (file://)\n";
+print STDERR "==== Running first test, using full IORs\n";
+
+$client = $CL1->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client 1 returned $client\n";
+ $status = 1;
}
print STDERR "==== Running second test, using corbaloc IORs ($port)\n";
-$CL2 = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-x -i 100 "
- . "-k corbaloc::localhost:"
- .$port
- ."/Simple_Server");
-$client2 = $CL2->TimedWait (60);
-if ($client2 == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL2->Kill (); $CL2->TimedWait (1);
-}
+$client = $CL2->SpawnWaitKill (60);
-if ($client2 != 0) {
- print STDERR "ERROR running client (iioploc://)\n";
+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;
-if ($server != 0
- || $client1 != 0
- || $client2 != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/IDL_Test/run_test.pl b/TAO/tests/IDL_Test/run_test.pl
index dc67cc4a602..5f74f1ef6c2 100755
--- a/TAO/tests/IDL_Test/run_test.pl
+++ b/TAO/tests/IDL_Test/run_test.pl
@@ -6,15 +6,15 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-require ACEutils;
-require Process;
+use PerlACE::Run_Test;
-$M = Process::Create ($EXEPREFIX."main".$EXE_EXT);
+$T = new PerlACE::Process ("main");
-$test = $M->TimedWait (10);
+$test = $T->SpawnWaitKill (60);
-if ($test == -1) {
- print STDERR "ERROR: test timedout\n";
- $M->Kill (); $M->TimedWait (1);
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
+exit 0;
diff --git a/TAO/tests/IORManipulation/run_test.pl b/TAO/tests/IORManipulation/run_test.pl
index 5134dea8b1d..6bb5b782e49 100755
--- a/TAO/tests/IORManipulation/run_test.pl
+++ b/TAO/tests/IORManipulation/run_test.pl
@@ -5,23 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("IORTest");
-$T = Process::Create ($EXEPREFIX."IORTest".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/InterOp-Naming/run_test.pl b/TAO/tests/InterOp-Naming/run_test.pl
index e07ec99a92a..c40891efdef 100755
--- a/TAO/tests/InterOp-Naming/run_test.pl
+++ b/TAO/tests/InterOp-Naming/run_test.pl
@@ -5,74 +5,67 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$file = "$cwd$DIR_SEPARATOR" . "test.ior";
-$port = ACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
+$file = PerlACE::LocalFile ("test.ior");
+$port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0
-ACE::checkForTarget($cwd);
+$status = 0;
print STDERR "\n\n==== InitRef test\n";
unlink $file;
-$SV = Process::Create ($EXEPREFIX."INS_test_server".$EXE_EXT,
+$SV = new PerlACE::Process ("INS_test_server",
"-ORBEndpoint iiop://1.0@"."$TARGETHOSTNAME:$port "
. " -i object_name -o $file -ORBDottedDecimalAddresses 1");
-if (ACE::waitforfile_timed ($file, 5) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($file, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
+$CL = new PerlACE::Process ("INS_test_client",
" random_service "
."-ORBInitRef random_service="
."corbaloc::1.1@"."$TARGETHOSTNAME:$port/object_name");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
print STDERR "\n\n==== InvalidName test\n";
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
- " not_a_service "
+$CL = new PerlACE::Process ("INS_test_client",
+ " not_a_service "
."-ORBInitRef random_service="
."corbaloc:iiop:1.0@"."$TARGETHOSTNAME:$port/object_name");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
print STDERR "\n\n==== DefaultInitRef test\n";
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
+$CL = new PerlACE::Process ("INS_test_client",
" object_name "
. "-ORBDefaultInitRef"
." corbaloc:iiop:1.0@"."$TARGETHOSTNAME:$port/");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
print STDERR "\n\n==== Multi endpoint test\n";
@@ -80,7 +73,7 @@ print STDERR "\n\n==== Multi endpoint test\n";
$port1 = $port + 1;
$port2 = $port + 2;
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
+$CL = new PerlACE::Process ("INS_test_client",
" random_service "
. "-ORBInitRef random_service="
."corbaloc:"
@@ -89,22 +82,19 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
."iiop:1.0@"."$TARGETHOSTNAME:$port"
."/object_name");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-print STDERR "\n\n==== Multi endpoint test with "
- . "CORBA::ORB::list_initial_services ()\n";
+print STDERR "\n\n==== Multi endpoint test with CORBA::ORB::list_initial_services ()\n";
$port1 = $port + 1;
$port2 = $port + 2;
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
+$CL = new PerlACE::Process ("INS_test_client",
" random_service "
. " -l "
. "-ORBInitRef random_service="
@@ -114,18 +104,16 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
. "iiop:1.0@"."$TARGETHOSTNAME:$port"
. "/object_name");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
print STDERR "\n\n==== Multi endpoint default ref test\n";
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
+$CL = new PerlACE::Process ("INS_test_client",
" object_name "
. "-ORBDefaultInitRef "
."corbaloc:"
@@ -133,39 +121,35 @@ $CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
."iiop:1.0@"."$TARGETHOSTNAME:$port2,"
."iiop:1.0@"."$TARGETHOSTNAME:$port/");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
print STDERR "\n\n==== Default ref with final '/'\n";
-$CL = Process::Create ($EXEPREFIX."INS_test_client".$EXE_EXT,
- " object_name "
+$CL = new PerlACE::Process ("INS_test_client",
+ " object_name "
. "-ORBDefaultInitRef "
."corbaloc:"
."iiop:1.0@"."$TARGETHOSTNAME:$port/");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$SV->Terminate (); $server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- unlink $file;
- exit 1;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-exit 0;
+
+exit $status;
diff --git a/TAO/tests/Leader_Followers/run_test.pl b/TAO/tests/Leader_Followers/run_test.pl
index 193f4f2a836..8f62289f149 100755
--- a/TAO/tests/Leader_Followers/run_test.pl
+++ b/TAO/tests/Leader_Followers/run_test.pl
@@ -5,139 +5,161 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("lb.ior");
+$mt_conffile = PerlACE::LocalFile ("multi_threaded_event_loop.conf");
+$st_conffile = PerlACE::LocalFile ("single_threaded_event_loop.conf");
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client");
-sub run_client
+sub run_client ($)
{
- my $args = shift;
+ my $args = shift;
- $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-k file://$iorfile " . $args);
+ $CL->Arguments ("-k file://$iorfile " . $args);
- $client = $CL->TimedWait (200);
- if ($client == -1) {
- $time = localtime;
- print STDERR "ERROR: client timedout at $time\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
+ my $client = $CL->SpawnWaitKill (200);
+
+ if ($client != 0) {
+ $time = localtime;
+ print STDERR "ERROR: client returned $client at $time\n";
+ $status = 1;
+ }
}
-sub run_clients
+sub run_clients ()
{
- print STDERR "\n\n*** No event loop threads ***\n\n\n";
+ print STDERR "\n\n*** No event loop threads ***\n\n\n";
- print STDERR "\nSelect Reactor\n\n";
+ print STDERR "\nSelect Reactor\n\n";
- run_client ("-ORBsvcconf single_threaded_event_loop.conf -e 0");
+ run_client ("-ORBsvcconf $st_conffile -e 0");
- print STDERR "\nTP Reactor\n\n";
+ print STDERR "\nTP Reactor\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 0");
+ run_client ("-ORBsvcconf $mt_conffile -e 0");
- print STDERR "\n\n*** Single-threaded client event loop: Select Reactor ***\n\n\n";
+ print STDERR "\n\n*** Single-threaded client event loop: Select Reactor ***\n\n\n";
- print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
- run_client ("-ORBsvcconf single_threaded_event_loop.conf -e 1 -t 3000");
+ run_client ("-ORBsvcconf $st_conffile -e 1 -t 3000");
- print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
- run_client ("-ORBsvcconf single_threaded_event_loop.conf -e 1 -t 10000");
+ run_client ("-ORBsvcconf $st_conffile -e 1 -t 10000");
- print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
- run_client ("-ORBsvcconf single_threaded_event_loop.conf -e 1 -t 20000");
+ run_client ("-ORBsvcconf $st_conffile -e 1 -t 20000");
- print STDERR "\n\n*** Single-threaded client event loop: TP Reactor ***\n\n\n";
+ print STDERR "\n\n*** Single-threaded client event loop: TP Reactor ***\n\n\n";
- print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 3 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 1 -t 3000");
+ run_client ("-ORBsvcconf $mt_conffile -e 1 -t 3000");
- print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 10 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 1 -t 10000");
+ run_client ("-ORBsvcconf $mt_conffile -e 1 -t 10000");
- print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
+ print STDERR "\nSingle-threaded client running event loop for 20 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 1 -t 20000");
+ run_client ("-ORBsvcconf $mt_conffile -e 1 -t 20000");
- print STDERR "\n\n*** Multi-threaded client event loop: TP Reactor ***\n\n\n";
+ print STDERR "\n\n*** Multi-threaded client event loop: TP Reactor ***\n\n\n";
- print STDERR "\nMulti-threaded client running event loop for 3 seconds\n\n";
+ print STDERR "\nMulti-threaded client running event loop for 3 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 5 -t 3000");
+ run_client ("-ORBsvcconf $mt_conffile -e 5 -t 3000");
- print STDERR "\nMulti-threaded client running event loop for 10 seconds\n\n";
+ print STDERR "\nMulti-threaded client running event loop for 10 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 5 -t 10000");
+ run_client ("-ORBsvcconf $mt_conffile -e 5 -t 10000");
- print STDERR "\nMulti-threaded client running event loop for 20 seconds\n\n";
+ print STDERR "\nMulti-threaded client running event loop for 20 seconds\n\n";
- run_client ("-ORBsvcconf multi_threaded_event_loop.conf -e 5 -t 20000 -x");
+ run_client ("-ORBsvcconf $mt_conffile -e 5 -t 20000 -x");
}
-unlink $iorfile;
+$single = 1;
+$multi = 0;
+
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") {
+ print "run_test [-m] -[a]\n";
+ print "\n";
+ print "-m -- tests the multithreaded server (default is single)\n";
+ print "-a -- tests both multi and single threaded servers\n";
+ exit 0;
+ }
+ elsif ($ARGV[$i] eq "-m") {
+ $multi = 1;
+ $single = 0;
+ }
+ elsif ($ARGV[$i] eq "-a") {
+ $multi = 1;
+ $single = 1;
+ }
+}
-print STDERR "\n\n*** Single threaded server ***\n\n\n";
+if ($single == 1) {
+ unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile");
+ print STDERR "\n\n*** Single threaded server ***\n\n\n";
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+ $SV->Arguments ("-o $iorfile");
-run_clients ();
+ $SV->Spawn ();
-$server = $SV->TimedWait (100);
-if ($server == -1) {
- $time = localtime;
- print STDERR "ERROR: server timedout at $time\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+ if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+ }
+
+ run_clients ();
-unlink $iorfile;
+ $server = $SV->WaitKill (100);
+ if ($server != 0) {
+ $time = localtime;
+ print STDERR "ERROR: server returned $server at $time\n";
+ $status = 1;
+ }
-if ($server != 0 || $client != 0) {
- print STDERR "ERROR: server exit value = $server and client exit value = $client\n";
- exit 1;
+ unlink $iorfile;
}
-print STDERR "\n\n*** Thread-Pool server ***\n\n\n";
+if ($multi == 1) {
+ unlink $iorfile;
+
+ print STDERR "\n\n*** Thread-Pool server ***\n\n\n";
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT",
- " -o $iorfile -e 5" .
- " -ORBSvcConf $cwd$DIR_SEPARATOR" .
- "multi_threaded_event_loop.conf");
+ $SV->Arguments ("-o $iorfile -e 5 -ORBSvcConf $mt_conffile");
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+ $SV->Spawn ();
-run_clients ();
+ if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+ }
-$server = $SV->TimedWait (100);
-if ($server == -1) {
- $time = localtime;
- print STDERR "ERROR: server timedout at $time\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+ run_clients ();
+
+ $server = $SV->WaitKill (10);
-unlink $iorfile;
+ if ($server != 0) {
+ $time = localtime;
+ print STDERR "ERROR: server returned $server at $time\n";
+ $SV->Kill ();
+ }
-if ($server != 0 || $client != 0) {
- exit 1;
+ unlink $iorfile;
}
-exit 0;
+exit $status;
diff --git a/TAO/tests/LongUpcalls/run_test.pl b/TAO/tests/LongUpcalls/run_test.pl
index d9b46b3bd7d..25bf98607cf 100755
--- a/TAO/tests/LongUpcalls/run_test.pl
+++ b/TAO/tests/LongUpcalls/run_test.pl
@@ -5,78 +5,67 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
$status = 0;
-ACE::checkForTarget($cwd);
+$iorfile = PerlACE::LocalFile ("test.ior");
+$svcfile = PerlACE::LocalFile ("svc.conf");
-$iorfile = "$cwd$DIR_SEPARATOR" ."test.ior";
-$svcfile = $cwd . $DIR_SEPARATOR . "svc.conf";
+$BSV = new PerlACE::Process ("blocking_server", "-ORBSvcConf $svcfile -o $iorfile");
+$ASV = new PerlACE::Process ("ami_server", "-ORBSvcConf $svcfile -o $iorfile");
+$BCL = new PerlACE::Process ("blocking_client", "-ORBSvcConf $svcfile -k file://$iorfile");
print STDERR "==== Server upcall waits for operations on other threads\n";
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."blocking_server$EXE_EXT",
- " -ORBSvcConf " . $svcfile
- . " -o $iorfile");
-
-if (ACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+
+$BSV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $BSV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."blocking_client$EXE_EXT",
- " -ORBSvcConf " . $svcfile
- . " -k file://$iorfile ");
+$client = $BCL->SpawnWaitKill (240);
-$client = $CL->TimedWait (240);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (30);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $BSV->WaitKill (30);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
print STDERR "==== Server upcall waits for AMI operations on other threads\n";
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."ami_server$EXE_EXT",
- " -ORBSvcConf " . $svcfile
- . " -o $iorfile");
-
-if (ACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$ASV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $ASV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."blocking_client$EXE_EXT",
- " -ORBSvcConf " . $svcfile
- . " -k file://$iorfile ");
+$client = $BCL->SpawnWaitKill (240);
-$client = $CL->TimedWait (240);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (30);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $ASV->WaitKill (30);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/tests/LongWrites/run_test.pl b/TAO/tests/LongWrites/run_test.pl
index 47cda458dee..71eafcca0b4 100755
--- a/TAO/tests/LongWrites/run_test.pl
+++ b/TAO/tests/LongWrites/run_test.pl
@@ -7,40 +7,56 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib '../../../bin';
use PerlACE::Run_Test;
-use Cwd;
-my $iorfile = PerlACE::LocalFile ("server.ior");
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-my $SV = new PerlACE::Process ("server", "-o $iorfile");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL1 = new PerlACE::Process ("client", " -k file://$iorfile ");
+$CL2 = new PerlACE::Process ("client", " -k file://$iorfile ");
+$CL3 = new PerlACE::Process ("client", " -k file://$iorfile ");
+
$SV->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$CL1 = new PerlACE::Process ("client", " -k file://$iorfile ");
-$CL2 = new PerlACE::Process ("client", " -k file://$iorfile ");
-$CL3 = new PerlACE::Process ("client", " -k file://$iorfile ");
-
$CL1->Spawn (60);
$CL2->Spawn (60);
$CL3->Spawn (60);
$client1 = $CL1->WaitKill (60);
+
+if ($client1 != 0) {
+ print STDERR "ERROR: client 1 returned $client1\n";
+ $status = 1;
+}
+
$client2 = $CL2->WaitKill (60);
+
+if ($client2 != 0) {
+ print STDERR "ERROR: client 2 returned $client2\n";
+ $status = 1;
+}
+
$client3 = $CL3->WaitKill (60);
-$server = $SV->WaitKill (5);
-unlink $iorfile;
-
-if ($server != 0
- || $client1 != 0 || $client2 != 0 || $client3 != 0) {
- print "ERROR: non-zero status returned by the server or clients\n";
- exit 1;
+if ($client3 != 0) {
+ print STDERR "ERROR: client 3 returned $client3\n";
+ $status = 1;
}
-exit 0;
+$server = $SV->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/MT_Client/run_test.pl b/TAO/tests/MT_Client/run_test.pl
index 9eb881d82ff..eef7ada635c 100755
--- a/TAO/tests/MT_Client/run_test.pl
+++ b/TAO/tests/MT_Client/run_test.pl
@@ -5,64 +5,61 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-$client_conf="$cwd$DIR_SEPARATOR" ."client.global.conf";
-$client_process="client";
-$debug_level='0';
-$threads='1';
+use lib '../../../bin';
+use PerlACE::Run_Test;
+
+$client_conf = PerlACE::LocalFile ("client.global.conf");
+$server_conf = PerlACE::LocalFile ("server.conf");
+$client_process = "client";
+$debug_level = '0';
+$threads = '1';
$status = 0;
-ACE::checkForTarget($cwd);
foreach $i (@ARGV) {
- if ($i eq '-tss') {
- $client_conf = "$cwd$DIR_SEPARATOR" . "client.tss.conf";
- } elsif ($i eq '-debug') {
- $debug_level = '1';
- } elsif ($i eq '-creation') {
- $client_process = 'orb_creation';
- $threads='2';
- }
+ if ($i eq '-tss') {
+ $client_conf = PerlACE::LocalFile ("client.tss.conf");
+ } elsif ($i eq '-debug') {
+ $debug_level = '1';
+ } elsif ($i eq '-creation') {
+ $client_process = 'orb_creation';
+ $threads='2';
+ }
}
-$iorfile = "$cwd$DIR_SEPARATOR" ."server.ior";
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -ORBsvcconf " . "$cwd$DIR_SEPARATOR" ."server.conf ".
- " -ORBdebuglevel $debug_level"
- . " -o $iorfile");
-
-if (ACE::waitforfile_timed ($iorfile, 30) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+
+$SV = new PerlACE::Process ("server", "-ORBsvcconf $server_conf -ORBdebuglevel $debug_level -o $iorfile");
+$CL = new PerlACE::Process ($client_process,
+ "-ORBsvcconf $client_conf "
+ . "-ORBdebuglevel $debug_level "
+ . "-k file://$iorfile "
+ . "-n $threads -i 1000 -x");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 30) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."$client_process$EXE_EXT ",
- " -ORBsvcconf $client_conf "
- . "-ORBdebuglevel $debug_level"
- . " -k file://$iorfile "
- . " -n $threads -i 1000 "
- . " -x");
-
-$client = $CL->TimedWait (240);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+$client = $CL->SpawnWaitKill (240);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (30);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->WaitKill (30);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
+
unlink $iorfile;
exit $status;
diff --git a/TAO/tests/MT_Server/run_test.pl b/TAO/tests/MT_Server/run_test.pl
index 32a2e7cefcb..cac09dd3d07 100755
--- a/TAO/tests/MT_Server/run_test.pl
+++ b/TAO/tests/MT_Server/run_test.pl
@@ -5,81 +5,68 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$threads='8';
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$threads = '8';
+$iorfile = PerlACE::LocalFile ("test.ior");
+$sv_conf = PerlACE::LocalFile ("server.conf");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -ORBsvcconf " . "$cwd$DIR_SEPARATOR" . "server.conf"
- . " -o $iorfile"
- . " -n $threads");
-
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
-sleep (1);
-
-$CL1 = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100");
-$CL2 = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100");
-$CL3 = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100");
-
-$client1 = $CL1->TimedWait (60);
-if ($client1 == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL1->Kill (); $CL1->TimedWait (1);
+$SV = new PerlACE::Process ("server", "-ORBsvcconf $sv_conf -o $iorfile -n $threads");
+$CL1 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
+$CL2 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
+$CL3 = new PerlACE::Process ("client", "-k file://$iorfile -i 100");
+$CLS = new PerlACE::Process ("client", "-k file://$iorfile -i 100 -x ");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$client2 = $CL2->TimedWait (60);
-if ($client2 == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL2->Kill (); $CL2->TimedWait (1);
+$CL1->Spawn ();
+$CL2->Spawn ();
+$CL3->Spawn ();
+
+$client = $CL1->WaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1
}
+$client = $CL2->WaitKill (30);
-$client3 = $CL3->TimedWait (60);
-if ($client3 == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL3->Kill (); $CL3->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile"
- . " -i 100 -x");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL3->WaitKill (30);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+$client = $CLS->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1
}
-unlink $iorfile;
+$server = $SV->WaitKill (5);
-if ($server != 0
- || $client1 != 0
- || $client2 != 0
- || $client3 != 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/tests/Multiple/Client.dsp b/TAO/tests/Multiple/Client.dsp
index e31150b20df..c956c5d7627 100644
--- a/TAO/tests/Multiple/Client.dsp
+++ b/TAO/tests/Multiple/Client.dsp
@@ -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 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 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /out:"Client.exe" /libpath:"..\..\..\ace" /libpath:"..\..\tao"
+# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
!ELSEIF "$(CFG)" == "Client - Win32 Debug"
diff --git a/TAO/tests/Multiple/Server.dsp b/TAO/tests/Multiple/Server.dsp
index e2e81c29774..c8d6c66f285 100644
--- a/TAO/tests/Multiple/Server.dsp
+++ b/TAO/tests/Multiple/Server.dsp
@@ -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 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 ace.lib tao.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /out:"Server.exe" /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer"
+# ADD LINK32 ace.lib tao.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer"
!ELSEIF "$(CFG)" == "Server - Win32 Debug"
diff --git a/TAO/tests/Multiple/run_test.pl b/TAO/tests/Multiple/run_test.pl
index 789f921beb4..fca870955df 100755
--- a/TAO/tests/Multiple/run_test.pl
+++ b/TAO/tests/Multiple/run_test.pl
@@ -6,100 +6,93 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "../../../bin";
-require Process;
-
-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
-
+use PerlACE::Run_Test;
$status = 0;
-$EXEPREFIX = "./";
-$DIRECT_COLLOC = "-ORBCollocationStrategy direct";
-$NO_COLLOC = "-ORBCollocation no";
-$cwd = getcwd();
+$direct_colloc = "-ORBCollocationStrategy direct";
+$no_colloc = "-ORBCollocation no";
+
+# @todo Test should take -o and -k options to specify iorfile
+# Hard coded in test.
+$iorfile = "s.ior";
-$iorfile = "$cwd$DIR_SEPARATOR" . "s.ior";
unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client");
#
# Test using ThruPOA collocation.
#
+$SV->Spawn ();
-$Server = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- "");
-
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $Server->Kill (); $Server->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
+$client = $CL->SpawnWaitKill (60);
-$Client = Process::Create($EXEPREFIX."client$EXE_EXT", "");
+$SV->Kill ();
-if ($Client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = 1;
- $Client->Kill ();
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$Server->Kill ();
-
-
#
# Test using Direct Collocation
#
unlink $iorfile;
-$Server = Process::Create ($EXEPREFIX."server$EXE_EXT", $DIRECT_COLLOC);
+$SV->Arguments ($direct_colloc);
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $Server->Kill (); $Server->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
+$client = $CL->SpawnWaitKill (60);
-$Client = Process::Create($EXEPREFIX."client$EXE_EXT", "");
+$SV->Kill ();
-if ($Client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = $status+1;
- $Client->Kill ();
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$Server->Kill ();
-
#
# Test using No Collocation
#
unlink $iorfile;
-$Server = Process::Create ($EXEPREFIX."server$EXE_EXT", $NO_COLLOC);
+$SV->Arguments ($no_colloc);
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $Server->Kill (); $Server->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;
}
+$client = $CL->SpawnWaitKill (60);
-$Client = Process::Create($EXEPREFIX."client$EXE_EXT", "");
+$SV->Kill ();
-if ($Client->TimedWait (60) == -1) {
- print STDERR "ERROR: client timedout\n";
- $status = $status+1;
- $Client3->Kill ();
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$Server->Kill ();
+unlink $iorfile;
exit $status
diff --git a/TAO/tests/Multiple_Inheritance/run_test.pl b/TAO/tests/Multiple_Inheritance/run_test.pl
index cb48069a5c1..f367f0bc639 100755
--- a/TAO/tests/Multiple_Inheritance/run_test.pl
+++ b/TAO/tests/Multiple_Inheritance/run_test.pl
@@ -5,43 +5,32 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior";
+$iorfile = PerlACE::LocalFile ("server.ior");
+unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server", "-f $iorfile");
+$CL = new PerlACE::Process ("client", "-f $iorfile");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT",
- " -f $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT",
- " -f $iorfile");
-
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
+$client = $CL->SpawnWaitKill (60);
-$SV->Terminate (); $server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+$SV->Kill ();
unlink $iorfile;
-if ($server == -1 || $client != 0) {
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ exit $client;
}
exit 0;
diff --git a/TAO/tests/Native_Exceptions/client.dsp b/TAO/tests/Native_Exceptions/client.dsp
index dd2c41aa036..fd541397959 100644
--- a/TAO/tests/Native_Exceptions/client.dsp
+++ b/TAO/tests/Native_Exceptions/client.dsp
@@ -118,6 +118,7 @@ SOURCE=.\test.idl
!IF "$(CFG)" == "Native Exceptions Client - Win32 Release"
# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
@@ -156,6 +157,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "Native Exceptions Client - Win32 Debug"
# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
diff --git a/TAO/tests/Native_Exceptions/run_test.pl b/TAO/tests/Native_Exceptions/run_test.pl
index 1feae5d78b9..b6db030b8cc 100755
--- a/TAO/tests/Native_Exceptions/run_test.pl
+++ b/TAO/tests/Native_Exceptions/run_test.pl
@@ -5,46 +5,38 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" ."test.ior";
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -i 1000");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile "
- . " -i 1000");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/Native_Exceptions/server.dsp b/TAO/tests/Native_Exceptions/server.dsp
index a2e1734086e..edd5e37c345 100644
--- a/TAO/tests/Native_Exceptions/server.dsp
+++ b/TAO/tests/Native_Exceptions/server.dsp
@@ -134,6 +134,7 @@ SOURCE=.\test.idl
!IF "$(CFG)" == "Native Exceptions Server - Win32 Release"
# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
@@ -172,6 +173,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "Native Exceptions Server - Win32 Debug"
# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\test.idl
InputName=test
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
index 951f7db9774..a75bf048920 100755
--- a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
+++ b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl
@@ -5,67 +5,60 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$ior1file = "$cwd$DIR_SEPARATOR" . "server1.ior";
-$ior2file = "$cwd$DIR_SEPARATOR" . "server2.ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$ior1file = PerlACE::LocalFile ("server1.ior");
+$ior2file = PerlACE::LocalFile ("server2.ior");
# Make sure the files are gone
unlink $ior1file;
unlink $ior2file;
-$SV1 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $ior1file ");
+$SV1 = new PerlACE::Process ("server", "-o $ior1file");
+$SV2 = new PerlACE::Process ("server", "-o $ior2file");
+$CL = new PerlACE::Process ("client", "-f $ior1file -g $ior2file -n 2 -i 10 -s 5");
-if (ACE::waitforfile_timed ($ior1file, 5) == -1) {
- print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV1->Kill (); $SV1->TimedWait (1);
- exit 1;
-}
+$SV1->Spawn ();
+$SV2->Spawn ();
-$SV2 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $ior2file ");
-
-if (ACE::waitforfile_timed ($ior2file, 5) == -1) {
+if (PerlACE::waitforfile_timed ($ior1file, 5) == -1) {
print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
+ $SV1->Kill ();
+ $SV2->Kill ();
exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- " -f $ior1file -g $ior2file -n 2 -i 10 -s 5");
-
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($ior2file, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$ior2file>\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
+ exit 1;
}
-$SV1->Terminate (); $server1 = $SV1->TimedWait (5);
-if ($server1 == -1) {
- print STDERR "ERROR: cannot terminate server1\n";
- $SV1->Kill (); $SV1->TimedWait (1);
- $SV2->Kill (); $SV2->TimedWait (1);
-}
+$client = $CL->SpawnWaitKill (60);
-$SV2->Terminate (); $server1 = $SV2->TimedWait (5);
-if ($server2 == -1) {
- print STDERR "ERROR: cannot terminate server2\n";
- $SV2->Kill (); $SV2->TimedWait (1);
-}
+$server1 = $SV1->TerminateWaitKill (5);
+$server2 = $SV2->TerminateWaitKill (5);
# Clean up
unlink $ior1file;
unlink $ior2file;
-if ($client == -1 || $server1 == -1 || $server2 == -1) {
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+if ($server1 != 0) {
+ print STDERR "ERROR: server 1 returned $server1\n";
+ $status = 1;
+}
+
+if ($server2 != 0) {
+ print STDERR "ERROR: server 2 returned $server2\n";
+ $status = 1;
}
-exit 0;
+exit $status;
diff --git a/TAO/tests/NestedUpcall/Simple/run_test.pl b/TAO/tests/NestedUpcall/Simple/run_test.pl
index 2ea90c54820..e43e5d6cb83 100755
--- a/TAO/tests/NestedUpcall/Simple/run_test.pl
+++ b/TAO/tests/NestedUpcall/Simple/run_test.pl
@@ -5,73 +5,70 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server", "-f $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
print STDERR "\nrunning ST version of the client and the server\n\n";
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -f $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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 ",
- " -k file://$iorfile -x");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
-if ($client != 0 || server != 0) {
- exit 1;
-}
+$SV->Arguments ("-f $iorfile -t 2");
+$CL->Arguments ("-k file://$iorfile -x -n 2");
print STDERR "\nrunning MT version of the client and the server\n\n";
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -f $iorfile -t 2");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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 ",
- " -k file://$iorfile -x -n 2");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
}
-exit 0;
+unlink $iorfile;
+
+exit $status;
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
index fa1e674f64d..27a7e0c54ce 100755
--- a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
+++ b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl
@@ -5,67 +5,61 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$ior1file = "$cwd$DIR_SEPARATOR" . "servera.ior";
-$ior2file = "$cwd$DIR_SEPARATOR" . "serverb.ior";
+$status = 0;
-ACE::checkForTarget($cwd);
+$ior1file = PerlACE::LocalFile ("servera.ior");
+$ior2file = PerlACE::LocalFile ("serverb.ior");
# Make sure these aren't hanging around
unlink $ior1file;
unlink $ior2file;
-$SV1 = Process::Create ($EXEPREFIX."server_A".$EXE_EXT,
- "-o $ior1file");
+$SV1 = new PerlACE::Process ("server_A", "-o $ior1file");
+$SV2 = new PerlACE::Process ("server_B", "-o $ior2file");
+$CL = new PerlACE::Process ("initiator", "-f $ior1file -g $ior2file");
-if (ACE::waitforfile_timed ($ior1file, 15) == -1) {
+$SV1->Spawn ();
+$SV2->Spawn ();
+
+if (PerlACE::waitforfile_timed ($ior1file, 15) == -1) {
print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV1->Kill (); $SV1->TimedWait (1);
+ $SV1->Kill ();
+ $SV2->Kill ();
exit 1;
}
-$SV2 = Process::Create ($EXEPREFIX."server_B".$EXE_EXT,
- "-o $ior2file");
-
-if (ACE::waitforfile_timed ($ior2file, 5) == -1) {
- print STDERR "ERROR: cannot find file <$ior1file>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
- $SV1->Kill (); $SV1->TimedWait (1);
+if (PerlACE::waitforfile_timed ($ior2file, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$ior2file>\n";
+ $SV2->Kill ();
+ $SV1->Kill ();
exit 1;
}
-$CL = Process::Create ($EXEPREFIX."initiator".$EXE_EXT,
- " -f $ior1file -g $ior2file");
+$client = $CL->SpawnWaitKill (60);
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
-}
-
-$SV1->Terminate (); $server1 = $SV1->TimedWait (5);
-if ($server1 == -1) {
- print STDERR "ERROR: cannot terminate server1\n";
- $SV1->Kill (); $SV1->TimedWait (1);
-}
-
-$SV2->Terminate (); $server1 = $SV2->TimedWait (5);
-if ($server2 == -1) {
- print STDERR "ERROR: cannot terminate server2\n";
- $SV2->Kill (); $SV2->TimedWait (1);
-}
+$server1 = $SV1->TerminateWaitKill (5);
+$server2 = $SV2->TerminateWaitKill (5);
# Clean up
unlink $ior1file;
unlink $ior2file;
-if ($client == -1 || $server1 == -1 || $server2 == -1) {
- exit 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+if ($server1 != 0) {
+ print STDERR "ERROR: server 1 returned $server1\n";
+ $status = 1;
+}
+
+if ($server2 != 0) {
+ print STDERR "ERROR: server 2 returned $server2\n";
+ $status = 1;
}
-exit 0;
+exit $status;
diff --git a/TAO/tests/Nested_Event_Loop/run_test.pl b/TAO/tests/Nested_Event_Loop/run_test.pl
index 9d1a922cb34..457e4f7df29 100755
--- a/TAO/tests/Nested_Event_Loop/run_test.pl
+++ b/TAO/tests/Nested_Event_Loop/run_test.pl
@@ -5,46 +5,39 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- "-k file://$iorfile -x");
+$client = $CL->SpawnWaitKill (200);
-$client = $CL->TimedWait (200);
-if ($client == -1) {
- $time = localtime;
- print STDERR "ERROR: client timedout at $time\n";
- $CL->Kill (); $CL->TimedWait (1);
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (100);
-if ($server == -1) {
- $time = localtime;
- print STDERR "ERROR: server timedout at $time\n";
- $SV->Kill (); $SV->TimedWait (1);
+$server = $SV->WaitKill (100);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/ORB_destroy/ORB_destroy.dsp b/TAO/tests/ORB_destroy/ORB_destroy.dsp
index af313b34aec..24536f6a0c0 100644
--- a/TAO/tests/ORB_destroy/ORB_destroy.dsp
+++ b/TAO/tests/ORB_destroy/ORB_destroy.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/tests/ORB_destroy/run_test.pl b/TAO/tests/ORB_destroy/run_test.pl
index 8880ed4f961..9f00793287b 100755
--- a/TAO/tests/ORB_destroy/run_test.pl
+++ b/TAO/tests/ORB_destroy/run_test.pl
@@ -5,19 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("ORB_destroy");
-$T = Process::Create ($EXEPREFIX."ORB_destroy".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/ORB_init/run_test.pl b/TAO/tests/ORB_init/run_test.pl
index 88863c537e1..89a6a345f8d 100755
--- a/TAO/tests/ORB_init/run_test.pl
+++ b/TAO/tests/ORB_init/run_test.pl
@@ -5,20 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("ORB_init");
-$orb_init = Process::Create ($EXEPREFIX."ORB_init".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$pid = $orb_init->TimedWait (15);
-if ($pid == -1) {
- print STDERR "ERROR: ORB_init timed out\n";
- $orb_init->Kill (); $orb_init->TimedWait (1);
-
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/Object_Loader/Test_DLL.dsp b/TAO/tests/Object_Loader/Test_DLL.dsp
index 8d4e20a6c91..a96ca863f76 100644
--- a/TAO/tests/Object_Loader/Test_DLL.dsp
+++ b/TAO/tests/Object_Loader/Test_DLL.dsp
@@ -39,7 +39,7 @@ RSC=rc.exe
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release/DLL"
+# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/DLL"
+# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
diff --git a/TAO/tests/Object_Loader/driver.dsp b/TAO/tests/Object_Loader/driver.dsp
index 087825d914d..4fdeb9847ad 100644
--- a/TAO/tests/Object_Loader/driver.dsp
+++ b/TAO/tests/Object_Loader/driver.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/tests/Object_Loader/run_test.pl b/TAO/tests/Object_Loader/run_test.pl
index 99649ceb974..f15b3fd3cec 100755
--- a/TAO/tests/Object_Loader/run_test.pl
+++ b/TAO/tests/Object_Loader/run_test.pl
@@ -8,6 +8,13 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib '../../../bin';
use PerlACE::Run_Test;
-my $CL = new PerlACE::Process ("driver", "");
+$T = new PerlACE::Process ("driver");
-exit $CL->SpawnWaitKill (60);
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
+}
+
+exit 0;
diff --git a/TAO/tests/OctetSeq/run_test.pl b/TAO/tests/OctetSeq/run_test.pl
index b79ea5331fe..a574ed6ef0e 100755
--- a/TAO/tests/OctetSeq/run_test.pl
+++ b/TAO/tests/OctetSeq/run_test.pl
@@ -5,62 +5,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
-print STDERR "\n\n==== Octet sequence passing test\n";
+unlink $iorfile;
+
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-i 5000 -k file://$iorfile");
+$T = new PerlACE::Process ("OctetSeq", "-n 32 -l 8192 -h 8192 -s 1 -q");
-$file="$cwd$DIR_SEPARATOR" . "test.ior";
+print STDERR "\n\n==== Octet sequence passing test\n";
-unlink $file;
+$SV->Spawn ();
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-o $file");
-if (ACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- " -i 5000 -k file://$file");
+$client = $CL->SpawnWaitKill (120);
-$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 (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+$server = $SV->WaitKill (5);
-if ($client == -1 || $server == -1) {
- exit 1;
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
-unlink $file;
-
print STDERR "\n\n==== Octet sequence performance test\n";
-$T = Process::Create ($EXEPREFIX."OctetSeq$EXE_EXT",
- " -n 32 -l 8192 -h 8192 -s 1 -q");
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ $status = 1;
}
-if ($client == -1) {
- exit 1;
-}
+unlink $iorfile;
-exit 0;
+exit $status;
diff --git a/TAO/tests/POA/Deactivation/run_test.pl b/TAO/tests/POA/Deactivation/run_test.pl
index a1856b59476..f3381e4fff6 100755
--- a/TAO/tests/POA/Deactivation/run_test.pl
+++ b/TAO/tests/POA/Deactivation/run_test.pl
@@ -5,23 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("Deactivation");
-$T = Process::Create ($EXEPREFIX."Deactivation".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/POA/Destruction/run_test.pl b/TAO/tests/POA/Destruction/run_test.pl
index 9a6c66ef400..cc3f201286f 100755
--- a/TAO/tests/POA/Destruction/run_test.pl
+++ b/TAO/tests/POA/Destruction/run_test.pl
@@ -5,23 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("Destruction");
-$T = Process::Create ($EXEPREFIX."Destruction".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/POA/Identity/run_test.pl b/TAO/tests/POA/Identity/run_test.pl
index 477183daba9..df9cee37e8f 100755
--- a/TAO/tests/POA/Identity/run_test.pl
+++ b/TAO/tests/POA/Identity/run_test.pl
@@ -5,23 +5,17 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("Identity", "-ORBobjrefstyle url");
-$T = Process::Create ($EXEPREFIX."Identity".$EXE_EXT, "-ORBobjrefstyle url");
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
+
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl b/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
index 0de131614e2..07f6a6303ed 100755
--- a/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
+++ b/TAO/tests/POA/Non_Servant_Upcalls/run_test.pl
@@ -5,23 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process("Non_Servant_Upcalls");
-$T = Process::Create ($EXEPREFIX."Non_Servant_Upcalls".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/POA/wait_for_completion/run_test.pl b/TAO/tests/POA/wait_for_completion/run_test.pl
index 652c62eceb8..3243a5feed5 100755
--- a/TAO/tests/POA/wait_for_completion/run_test.pl
+++ b/TAO/tests/POA/wait_for_completion/run_test.pl
@@ -5,23 +5,16 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-ACE::checkForTarget(getcwd());
+$T = new PerlACE::Process ("wait_for_completion");
-$T = Process::Create ($EXEPREFIX."wait_for_completion".$EXE_EXT);
+$test = $T->SpawnWaitKill (60);
-$client = $T->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
-}
-
-if ($client == -1) {
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
index a5ff8189fa1..df5815fec66 100755
--- a/TAO/tests/Param_Test/run_test.pl
+++ b/TAO/tests/Param_Test/run_test.pl
@@ -5,59 +5,20 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-
-
use lib "../../../bin";
-require ACEutils;
-require Process;
-use Cwd;
+use PerlACE::Run_Test;
+
+$iorfile = PerlACE::LocalFile ("server.ior");
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior";
$invocation = "sii";
$num = 5;
$other = "";
$debug = "";
$type = "";
+$status = 0;
unlink $iorfile;
-sub run_test
-{
- my $type = shift(@_);
-
- unlink $iorfile; # Ignore errors
- print STDERR "==== Testing $type === wait....\n";
-
- $SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "$debug -o $iorfile");
-
- if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- $CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- " $debug -f $iorfile -i $invocation "
- . "-t $type -n $num -x");
-
- $client = $CL->TimedWait (60);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
-
- $server = $SV->TimedWait (10);
- if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- }
- unlink $iorfile;
-
- print STDERR "==== Test for $type finished ===\n";
-}
-
# Parse the arguments
@types = ("short", "ulonglong", "ubstring", "bdstring",
@@ -74,73 +35,76 @@ sub run_test
"big_union", "small_union", "recursive_union", "complex_any");
-ACE::checkForTarget($cwd);
-
-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 Perl script for TAO Param Test\n\n";
print "run_test [-n num] [-d] [-onewin] [-h] [-t type] [-i (dii|sii)] [-chorus <target>]\n";
print "\n";
print "-n num -- runs the client num times\n";
print "-d -- runs each in debug mode\n";
- print "-onewin -- keeps all tests in one window on NT\n";
print "-h -- prints this information\n";
print "-t type -- runs only one type of param test\n";
print "-i (dii|sii) -- Changes the type of invocation\n";
print "-chorus <target> -- Run tests on chorus target\n";
exit 0;
}
- if ($ARGV[$i] eq "-n")
- {
+ elsif ($ARGV[$i] eq "-n") {
$num = $ARGV[$i + 1];
$i++;
- last SWITCH;
}
- if ($ARGV[$i] eq "-d")
- {
+ elsif ($ARGV[$i] eq "-d") {
$debug = $debug." -d";
- last SWITCH;
}
- if ($ARGV[$i] eq "-onewin")
- {
- if ($^O eq "MSWin32")
- {
- $newwindow = "no";
- }
- last SWITCH;
- }
- if ($ARGV[$i] eq "-twowin")
- {
- if ($^O eq "MSWin32")
- {
- $newwindow = "yes";
- }
- last SWITCH;
- }
- if ($ARGV[$i] eq "-t")
- {
+ elsif ($ARGV[$i] eq "-t") {
@types = split (',', $ARGV[$i + 1]);
$i++;
- last SWITCH;
}
- if ($ARGV[$i] eq "-i")
- {
+ elsif ($ARGV[$i] eq "-i") {
$invocation = $ARGV[$i + 1];
$i++;
- last SWITCH;
}
- $other .= $ARGV[$i];
- }
+ else {
+ $other .= $ARGV[$i];
+ }
}
+$SV = new PerlACE::Process ("server", "$debug -o $iorfile");
+$CL = new PerlACE::Process ("client");
+
foreach $type (@types) {
- run_test ($type);
+ unlink $iorfile; # Ignore errors
+
+ print STDERR "==== Testing $type === wait....\n";
+
+ $SV->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+ }
+
+ $CL->Arguments ("$debug -f $iorfile -i $invocation -t $type -n $num -x");
+
+ $client = $CL->SpawnWaitKill (60);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
+
+ $server = $SV->WaitKill (10);
+
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+ }
+
+ unlink $iorfile;
+
+ print STDERR "==== Test for $type finished ===\n";
}
unlink $iorfile;
-exit 0;
+exit $status;
diff --git a/TAO/tests/Param_Test/run_test_dii.pl b/TAO/tests/Param_Test/run_test_dii.pl
index baebb2fd213..deff232deb7 100755
--- a/TAO/tests/Param_Test/run_test_dii.pl
+++ b/TAO/tests/Param_Test/run_test_dii.pl
@@ -8,5 +8,5 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
@ARGS=('run_test.pl', '-i', 'dii');
push @ARGS, @ARGV;
-exec 'run_test.pl', @ARGS;
+system ('perl ', join ' ', @ARGS);
diff --git a/TAO/tests/Policies/run_test.pl b/TAO/tests/Policies/run_test.pl
index 33c6b139a6a..4d9888e2950 100755
--- a/TAO/tests/Policies/run_test.pl
+++ b/TAO/tests/Policies/run_test.pl
@@ -5,22 +5,18 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$threads='10';
-$status = 0;
+$threads = '10';
-$T = Process::Create ($EXEPREFIX."Manipulation$EXE_EXT",
- " -n $threads");
+$T = new PerlACE::Process ("Manipulation", "-n $threads");
-$t = $T->TimedWait (60);
-if ($t == -1) {
- print STDERR "ERROR: test timedout\n";
- $T->Kill (); $T->TimedWait (1);
- $status = 1;
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
-exit $status;
+exit 0;
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/client.dsp b/TAO/tests/Portable_Interceptors/Benchmark/client.dsp
index 138b58055cd..ae15cf14423 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/client.dsp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/client.dsp
@@ -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 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 ACE.lib TAO.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
+# ADD LINK32 ACE.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\..\ace"
!ELSEIF "$(CFG)" == "Benchmark Client - Win32 Debug"
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl b/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl
index 1178584674b..32b233a0ed9 100755
--- a/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/Benchmark/run_test.pl
@@ -5,46 +5,39 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
-
-print STDERR "\n\n==== Running interceptor Benchmark test\n";
-
-$file = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$file = PerlACE::LocalFile ("test.ior");
unlink $file;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-ORBobjrefstyle url -o $file");
-if (ACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-ORBobjrefstyle url -o $file");
+$CL = new PerlACE::Process ("client", "-ORBobjrefstyle url -f file://$file");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "-ORBobjrefstyle url -f file://$file");
+print STDERR "\n\n==== Running interceptor Benchmark test\n";
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\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;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/server.dsp b/TAO/tests/Portable_Interceptors/Benchmark/server.dsp
index 225b41b42cd..f8b07aebf0f 100644
--- a/TAO/tests/Portable_Interceptors/Benchmark/server.dsp
+++ b/TAO/tests/Portable_Interceptors/Benchmark/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/tests/Portable_Interceptors/Dynamic/run_test.pl b/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl
index e588c46209d..43c9f86a683 100755
--- a/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl
@@ -5,48 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
-
-print STDERR "\n\n==== Running interceptor Dynamic test\n";
-
-$file = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$file = PerlACE::LocalFile ("test.ior");
unlink $file;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-ORBobjrefstyle url -o $file");
-if (ACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-ORBobjrefstyle url -o $file");
+$CL = new PerlACE::Process ("client", "-ORBobjrefstyle url -f file://$file");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "-ORBobjrefstyle url -f file://$file");
+print STDERR "\n\n==== Running interceptor Dynamic test\n";
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\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;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-exit 0;
+exit $status;
diff --git a/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl b/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl
index 6556e3ecae7..08d3520bdbb 100755
--- a/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/ForwardRequest/run_test.pl
@@ -7,52 +7,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
-
-print STDERR "\n\n==== Running PortableInterceptor::ForwardRequest test\n";
-
-$file1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$file2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
+$file1 = PerlACE::LocalFile ("test1.ior");
+$file2 = PerlACE::LocalFile ("test2.ior");
unlink $file1;
unlink $file2;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-o $file1 -o $file2");
-if (ACE::waitforfile_timed ($file1, 15) == -1
- || ACE::waitforfile_timed ($file2, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file1> or <$file2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-o $file1 -o $file2");
+$CL = new PerlACE::Process ("client", "-k file://$file1 -k file://$file2");
+
+$status = 0;
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "-k file://$file1 -k file://$file2");
+print STDERR "\n\n==== Running PortableInterceptor::ForwardRequest test\n";
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file1, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file1>\n";
+ $SV->Kill ();
+ exit 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file2, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file2>\n";
+ $SV->Kill ();
+ exit 1;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+}
+
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file1;
unlink $file2;
-exit 0;
+exit $status;
diff --git a/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl b/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl
index 1b6cf1435dd..5675008c909 100755
--- a/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/IORInterceptor/run_test.pl
@@ -5,48 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
# $Id$
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
-
-print STDERR "\n\n==== Running IORInterceptor test\n";
-
-$file = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$file = PerlACE::LocalFile ("test.ior");
unlink $file;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-o $file");
-if (ACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-o $file");
+$CL = new PerlACE::Process ("client", "-k file://$file");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "-k file://$file");
+print STDERR "\n\n==== Running IORInterceptor test\n";
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\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;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-exit 0;
+exit $status;
diff --git a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl
index 9bb90119a31..51c67cc0c58 100755
--- a/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/Service_Context_Manipulation/run_test.pl
@@ -5,48 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require Process;
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-ACE::checkForTarget($cwd);
-
-print STDERR "\n\n==== Running interceptor test\n";
-
-$file = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$file = PerlACE::LocalFile ("test.ior");
unlink $file;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-ORBobjrefstyle url -o $file");
-if (ACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-ORBobjrefstyle url -o $file");
+$CL = new PerlACE::Process ("client", "-ORBobjrefstyle url -f file://$file");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "-ORBobjrefstyle url -f file://$file");
+print STDERR "\n\n==== Running interceptor test\n";
+$SV->Spawn ();
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+if (PerlACE::waitforfile_timed ($file, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\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;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
index 4ee9d671786..088e884a9da 100755
--- a/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
+++ b/TAO/tests/RTCORBA/Banded_Connections/run_test.pl
@@ -5,28 +5,28 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
+$status = 0;
-ACE::checkForTarget($cwd);
-
-print STDERR "\n********** RTCORBA Priority Banded Connections Unit Test\n";
+$iorfile1 = PerlACE::LocalFile ("test1.ior");
+$iorfile2 = PerlACE::LocalFile ("test2.ior");
+$server_conf = PerlACE::LocalFile ("server.conf");
unlink $iorfile1;
unlink $iorfile2;
+print STDERR "\n********** RTCORBA Priority Banded Connections Unit Test\n";
+
+
# CORBA priorities 66, 75 and 80, etc. are for the SCHED_OTHER class on
# Solaris. May need to use different values for other platforms
# depending on their native priorities scheme, i.e., based on the
# available range.
$server_args =
- "-n $iorfile1 -o $iorfile2 -b bands.unix -ORBSvcConf server.conf "
+ "-n $iorfile1 -o $iorfile2 -b bands.unix -ORBSvcConf $server_conf "
."-ORBdebuglevel 1 -p 67 -w 78 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=66 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=75 "
@@ -36,10 +36,9 @@ $client_args =
"-n file://$iorfile1 -o file://$iorfile2 "
."-a 76 -b 80 -c 64";
-if ($^O eq "MSWin32")
-{
+if ($^O eq "MSWin32") {
$server_args =
- "-n $iorfile1 -o $iorfile2 -b bands.nt -ORBSvcConf server.conf "
+ "-n $iorfile1 -o $iorfile2 -b bands.nt -ORBSvcConf $server_conf "
."-ORBdebuglevel 1 -p 1 -w 3 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=2 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=5 "
@@ -50,35 +49,35 @@ if ($^O eq "MSWin32")
."-a 4 -b 6 -c 3";
}
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- $server_args);
+$SV = new PerlACE::Process ("server", $server_args);
+$CL = new PerlACE::Process ("client", $client_args);
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- $client_args);
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (30);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile1;
unlink $iorfile2;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
+# Clean up SHMIOP files
+unlink glob ("server_shmiop_*");
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/Client_Propagated/run_test.pl b/TAO/tests/RTCORBA/Client_Propagated/run_test.pl
index 92f93b96a5b..36f3155daef 100755
--- a/TAO/tests/RTCORBA/Client_Propagated/run_test.pl
+++ b/TAO/tests/RTCORBA/Client_Propagated/run_test.pl
@@ -5,47 +5,42 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
-ACE::checkForTarget($cwd);
+$iorfile = PerlACE::LocalFile ("test.ior");
+
+unlink $iorfile;
print STDERR "\n RTCORBA CLIENT_PROPAGATED Priority Unit Test\n\n";
-unlink $iorfile;
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-k file://$iorfile");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -k file://$iorfile");
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (60);
+
+if ($server !=0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
index e066e18d567..a977fb0b44a 100755
--- a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
+++ b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
@@ -5,21 +5,19 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
+$status = 0;
-ACE::checkForTarget($cwd);
-
-print STDERR "\n********** RTCORBA Client Protocol Policy Unit Test\n\n";
+$iorfile1 = PerlACE::LocalFile ("test1.ior");
+$iorfile2 = PerlACE::LocalFile ("test2.ior");
unlink $iorfile1;
unlink $iorfile2;
+print STDERR "\n********** RTCORBA Client Protocol Policy Unit Test\n\n";
+
# Arguments are platform-dependent (UIOP not available on Windows).
$server_args =
"-s $iorfile1 -c $iorfile2 -p 1413566208 "
@@ -27,47 +25,45 @@ $server_args =
$client_args =
"-s file://$iorfile1 -c file://$iorfile2 -p 1413566210 -ORBdebuglevel 1 ";
-if ($^O eq "MSWin32")
-{
-$server_args =
- "-s $iorfile1 -c $iorfile2 -p 1413566210 "
- ."-ORBendpoint iiop:// -ORBendpoint shmiop:// ";
-$client_args =
- "-s file://$iorfile1 -c file://$iorfile2 -ORBdebuglevel 1";
+if ($^O eq "MSWin32") {
+ $server_args =
+ "-s $iorfile1 -c $iorfile2 -p 1413566210 "
+ ."-ORBendpoint iiop:// -ORBendpoint shmiop:// ";
+ $client_args =
+ "-s file://$iorfile1 -c file://$iorfile2 -ORBdebuglevel 1";
}
# Start server.
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- $server_args);
+$SV = new PerlACE::Process ("server", $server_args);
+$CL = new PerlACE::Process ("client", $client_args);
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill ();
+ exit 1;
}
# Start client.
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- $client_args);
-
-# Clean up.
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+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);
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile1;
unlink $iorfile2;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
+# Clean up SHMIOP files
+unlink glob ("server_shmiop_*");
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
index 936e051a1c5..3d41c7f0c42 100755
--- a/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
+++ b/TAO/tests/RTCORBA/Explicit_Binding/run_test.pl
@@ -5,49 +5,45 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
-ACE::checkForTarget($cwd);
+unlink $iorfile;
print STDERR "\n********** RTCORBA Explicit Binding Unit Test\n\n";
-unlink $iorfile;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile "
- ."-ORBendpoint iiop:// "
- ."-ORBendpoint shmiop://");
+$SV = new PerlACE::Process ("server", "-o $iorfile -ORBendpoint iiop:// -ORBendpoint shmiop://");
+$CL = new PerlACE::Process ("client", "-o file://$iorfile -ORBdebuglevel 1");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -o file://$iorfile -ORBdebuglevel 1 ");
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
+# Clean up SHMIOP files
+unlink glob ("server_shmiop_*");
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
index 7358044020e..6d9b05d6b39 100755
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
@@ -4,10 +4,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
-unshift @INC, '../../../../bin';
-require Process;
-require Uniqueid;
-
# Usage:
# process-output.pl output-filename number-of-iterations priority1 priority2
@@ -32,6 +28,8 @@ $iterations = $ARGV[1];
$priority1 = $ARGV[2];
$priority2 = $ARGV[3];
+$errors = 0;
+
# Open the output file.
if ($input_file and $ARGV[1])
{
@@ -116,12 +114,14 @@ if ($server_shutdown == 0
or $threads_finished == 0)
{
print "ERROR: Missing test over message\n";
+ ++$errors;
}
elsif ($iiop_requests != $shmiop_requests
or $iiop_requests != $iterations)
{
print "ERROR: Number of iiop requests differs from shmiop differs from "
."number of iterations\n";
+ ++$errors;
}
elsif (($priority1 != $priority2
and ($priority1_requests != $priority2_requests
@@ -131,12 +131,16 @@ elsif (($priority1 != $priority2
or $priority1_requests != 2*$iterations)))
{
print "ERROR: Nonmatching number of requests of each priority\n";
+ ++$errors;
}
elsif ($test_method != 2*$iterations)
{
print "ERROR: Incorrect number servant invocations\n";
+ ++$errors;
}
else
{
print "Test output is ok \n";
}
+
+exit $errors;
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl
index 561e877acb5..650ffcd2586 100755
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl
@@ -5,35 +5,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
+$status = 0;
+$quiet = 0;
+
+# check for -q flag
+if ($ARGV[0] eq '-q') {
+ $quiet = 1;
+}
# Test parameters.
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-$data_file = "$cwd$DIR_SEPARATOR" . "test_run.data";
+$iorfile = PerlACE::LocalFile ("test.ior");
+$data_file = PerlACE::LocalFile ("test_run.data");
+
$iterations = 50;
$priority1 = 65;
$priority2 = 70;
$priority3 = 75;
-if ($^O eq "MSWin32")
-{
+
+if ($^O eq "MSWin32") {
$priority1 = 6;
$priority2 = 1;
$priority3 = 5;
}
-ACE::checkForTarget($cwd);
-
# Clean up leftovers from previous runs.
-#unlink $iorfile;
-#unlink $data_file;
+unlink $iorfile;
+unlink $data_file;
+$server_conf = PerlACE::LocalFile ("server.conf");
$server_args =
- "-o $iorfile -ORBdebuglevel 1 -ORBsvcconf server.conf "
+ "-o $iorfile -ORBdebuglevel 1 -ORBsvcconf $server_conf "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority1 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority2 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority3 "
@@ -45,38 +50,43 @@ $client_args =
"-o file://$iorfile "
."-a $priority1 -b $priority2 -e 1413566210 -f 0 -n $iterations";
+$SV = new PerlACE::Process ("server", $server_args);
+$CL = new PerlACE::Process ("client", $client_args);
print STDERR "\n********** MT Client Protocol & CLIENT_PROPAGATED combo Test\n\n";
# Redirect the output of the test run to a file, so that we can process it later.
+
open (OLDOUT, ">&STDOUT");
open (STDOUT, ">$data_file") or die "can't redirect stdout: $!";
open (OLDERR, ">&STDERR");
open (STDERR, ">&STDOUT") or die "can't redirect stderror: $!";
+# just here to quiet warnings
+$fh = \*OLDOUT;
+$fh = \*OLDERR;
+
# Run server and client.
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- $server_args);
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- $client_args);
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
close (STDERR);
@@ -86,18 +96,32 @@ open (STDERR, ">&OLDERR");
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
# Run a processing script on the test output.
-$FL = Process::Create ($EXEPREFIX."process-output.pl",
- " $data_file $iterations $priority1 $priority2");
-$filter = $FL->TimedWait (60);
-if ($filter == -1) {
- print STDERR "ERROR: filter timedout\n";
- $FL->Kill (); $FL->TimedWait (1);
+print STDERR "\n********** Processing test output\n\n";
+
+$errors = system ("perl process-output.pl $data_file $iterations $priority1 $priority2") >> 8;
+
+if ($errors > 0) {
+ $status = 1;
+
+ if (!$quiet) {
+ print STDERR "Errors Detected, printing output\n";
+ if (open (DATA, "<$data_file")) {
+ print STDERR "================================= Begin\n";
+ print STDERR <DATA>;
+ print STDERR "================================= End\n";
+ close (DATA);
+ }
+ else {
+ print STDERR "ERROR: Could not open $data_file\n";
+ }
+ unlink $data_file;
+ }
}
- print STDERR "\n";
-exit 0;
+unlink $iorfile;
+
+# Clean up shmiop files
+unlink glob ("server_shmiop_*");
+
+exit $status;
diff --git a/TAO/tests/RTCORBA/Private_Connection/run_test.pl b/TAO/tests/RTCORBA/Private_Connection/run_test.pl
index 08f02da64b8..46efef27cba 100755
--- a/TAO/tests/RTCORBA/Private_Connection/run_test.pl
+++ b/TAO/tests/RTCORBA/Private_Connection/run_test.pl
@@ -5,51 +5,45 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
+$status = 0;
-ACE::checkForTarget($cwd);
-
-print STDERR "\n********** RTCORBA Private Connection Unit Test\n\n";
+$iorfile1 = PerlACE::LocalFile ("test1.ior");
+$iorfile2 = PerlACE::LocalFile ("test2.ior");
unlink $iorfile1;
unlink $iorfile2;
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile1 -p $iorfile2 ");
+print STDERR "\n********** RTCORBA Private Connection Unit Test\n\n";
+
+$SV = new PerlACE::Process ("server", "-o $iorfile1 -p $iorfile2");
+$CL = new PerlACE::Process ("client", "-o file://$iorfile1 -p file://$iorfile2 -ORBdebuglevel 3 ");
-if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- " -o file://$iorfile1 -p file://$iorfile2 "
- ."-ORBdebuglevel 3 ");
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server \n";
+ $status = 1;
}
unlink $iorfile1;
unlink $iorfile2;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/RTMutex/run_test.pl b/TAO/tests/RTCORBA/RTMutex/run_test.pl
index 702f8d599f7..e123f4ea033 100755
--- a/TAO/tests/RTCORBA/RTMutex/run_test.pl
+++ b/TAO/tests/RTCORBA/RTMutex/run_test.pl
@@ -5,29 +5,18 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-
-ACE::checkForTarget($cwd);
+use lib '../../../../bin';
+use PerlACE::Run_Test;
print STDERR "\n********** RTCORBA RTMutex Unit Test **********\n\n";
-$server_args="";
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- $server_args);
+$T = new PerlACE::Process ("server");
-$server = $SV->TimedWait (60);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
-}
+$test = $T->SpawnWaitKill (60);
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit 1;
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
exit 0;
diff --git a/TAO/tests/RTCORBA/Server_Declared/run_test.pl b/TAO/tests/RTCORBA/Server_Declared/run_test.pl
index a2c4e48a50b..d6367af3a5f 100755
--- a/TAO/tests/RTCORBA/Server_Declared/run_test.pl
+++ b/TAO/tests/RTCORBA/Server_Declared/run_test.pl
@@ -5,36 +5,32 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
-
-ACE::checkForTarget($cwd);
-
-print STDERR "\n********** RTCORBA SERVER_DECLARED Priority Unit Test\n\n";
+$iorfile1 = PerlACE::LocalFile ("test1.ior");
+$iorfile2 = PerlACE::LocalFile ("test2.ior");
unlink $iorfile1;
unlink $iorfile2;
+
+$server_conf = PerlACE::LocalFile ("server.conf");
+
# CORBA priorities 65, 70 and 75 are for the SCHED_OTHER class on
# Solaris. May need to use different values for other platforms
# depending on their native priorities scheme, i.e., based on the
# available range.
$server_args =
- "-p $iorfile1 -o $iorfile2 -a 65 -b 75 -c 70 -ORBSvcConf server.conf "
+ "-p $iorfile1 -o $iorfile2 -a 65 -b 75 -c 70 -ORBSvcConf $server_conf "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=65 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=75 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=73 ";
-if ($^O eq "MSWin32")
-{
+if ($^O eq "MSWin32") {
$server_args =
- "-p $iorfile1 -o $iorfile2 -a 3 -b 5 -c 2 -ORBSvcConf server.conf "
+ "-p $iorfile1 -o $iorfile2 -a 3 -b 5 -c 2 -ORBSvcConf $server_conf "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=3 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=5 "
."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=1 ";
@@ -42,35 +38,35 @@ if ($^O eq "MSWin32")
$client_args = "-p file://$iorfile1 -o file://$iorfile2";
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- $server_args);
+$SV = new PerlACE::Process ("server", $server_args);
+$CL = new PerlACE::Process ("client", $client_args);
+
+print STDERR "\n********** RTCORBA SERVER_DECLARED Priority Unit Test\n\n";
+
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
- $client_args);
+$client = $CL->SpawnWaitKill (60);
-$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);
+$server = $SV->WaitKill (60);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile1;
unlink $iorfile2;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
index 97576d62193..7ff8c15bac4 100755
--- a/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
+++ b/TAO/tests/RTCORBA/Server_Protocol/run_test.pl
@@ -5,61 +5,33 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
+$iorfile = PerlACE::LocalFile ("test.ior");
-ACE::checkForTarget($cwd);
-
-print STDERR "********** RTCORBA Server Protocol Policy Unit Test\n";
-
-
-sub server
-{
- my $args = "@_ "."-o $iorfile";
-
- unlink $iorfile;
- $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", $args);
-
- if (ACE::waitforfile_timed ($iorfile, 10) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-}
-
-sub client
-{
- my $args = " -k file://$iorfile -ORBdebuglevel 1";
-
- $CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", $args);
+unlink $iorfile;
- $client = $CL->TimedWait (60);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
-}
+$server_reverse_conf = PerlACE::LocalFile ("server_reverse.conf");
+$server_shmiop_conf = PerlACE::LocalFile ("server_shmiop.conf");
+$server_reverse_nt_conf = PerlACE::LocalFile ("server_reverse_nt.conf");
# Configurations for all tests to be run.
@server_opts =
("-ORBendpoint iiop://",
- "-ORBsvcconf server_reverse.conf "
+ "-ORBsvcconf $server_reverse_conf "
."-ORBEndpoint uiop:// -ORBendpoint shmiop:// -ORBendpoint iiop://",
- "-ORBsvcconf server_shmiop.conf -ORBendpoint shmiop://",
+ "-ORBsvcconf $server_shmiop_conf -ORBendpoint shmiop://",
"-ORBEndpoint uiop:// "
." -ORBendpoint shmiop:// -ORBendpoint iiop://"
- ." -ORBsvcconf server_shmiop.conf -p 1413566208",
+ ." -ORBsvcconf $server_shmiop_conf -p 1413566208",
"-ORBEndpoint uiop:// "
." -ORBendpoint shmiop:// -ORBendpoint iiop://"
- ." -ORBsvcconf server_shmiop.conf -p 1413566210 ");
+ ." -ORBsvcconf $server_shmiop_conf -p 1413566210 ");
@comments = ("* ORB Default Server Protocol Policy Test\n "
."(TAO's default behavior without config files): \n",
@@ -77,48 +49,74 @@ sub client
." (POA Server Protocol set to SHMIOP only): \n");
# UIOP only available on Unix. Substitute with alternative tests on Windows.
-if ($^O eq "MSWin32")
-{
+if ($^O eq "MSWin32") {
@server_opts =
("-ORBendpoint iiop://",
- "-ORBsvcconf server_reverse_nt.conf "
+ "-ORBsvcconf $server_reverse_nt_conf "
."-ORBEndpoint shmiop:// -ORBendpoint iiop://",
- "-ORBsvcconf server_shmiop.conf -ORBendpoint shmiop://",
+ "-ORBsvcconf $server_shmiop_conf -ORBendpoint shmiop://",
"-ORBendpoint shmiop:// -ORBendpoint iiop://"
- ." -ORBsvcconf server_shmiop.conf -p 0",
+ ." -ORBsvcconf $server_shmiop_conf -p 0",
"-ORBendpoint shmiop:// -ORBendpoint iiop://"
- ." -ORBsvcconf server_shmiop.conf -p 1413566210");
+ ." -ORBsvcconf $server_shmiop_conf -p 1413566210");
$comments[3] =
"Overriding ORB Default Server Protocol Policy in the POA "
."(POA Server Protocol set to IIOP only): \n";
}
+print STDERR "********** RTCORBA Server Protocol Policy Unit Test\n";
$test_number = 0;
-foreach $o (@server_opts)
-{
+$SV = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client");
+
+
+foreach $o (@server_opts) {
print STDERR "\n\n----------------------------------\n";
print STDERR " ".$comments[$test_number];
- server ($o);
+ my $args = "$o -o $iorfile";
- client ();
+ unlink $iorfile;
+
+ $SV->Arguments ($args);
+
+ $SV->Spawn ();
- $SV->Terminate ();
- $server = $SV->TimedWait (60);
- if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
+ if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+ }
+
+ $CL->Arguments ("-k file://$iorfile -ORBdebuglevel 1");
+
+ $client = $CL->SpawnWaitKill (60);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
+
+ $server = $SV->TerminateWaitKill (60);
+
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
$test_number++;
}
unlink $iorfile;
-exit 0;
+
+# Clean up SHMIOP files
+unlink glob ("server_shmiop_*");
+
+exit $status;
diff --git a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl b/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
index 4f1511c74df..6bd51348b82 100755
--- a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
+++ b/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
@@ -5,45 +5,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
-
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-
-ACE::checkForTarget($cwd);
+use lib '../../../../bin';
+use PerlACE::Run_Test;
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile");
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-i file://$iorfile");
+
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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",
- "-i file://$iorfile");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
-if ($client != 0 || server != 0) {
- exit 1;
-}
+exit $status;
diff --git a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl b/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
index 107851f02c1..fa5d9031263 100755
--- a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
+++ b/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
@@ -5,44 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-i file://$iorfile");
+
print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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 ", "-i file://$iorfile");
+$client = $CL->SpawnWaitKill (60);
-$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 (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;
-if ($client != 0 || server != 0) {
- exit 1;
-}
+exit $status;
diff --git a/TAO/tests/Smart_Proxies/Policy/run_test.pl b/TAO/tests/Smart_Proxies/Policy/run_test.pl
index ac709742a4b..0ff69078181 100755
--- a/TAO/tests/Smart_Proxies/Policy/run_test.pl
+++ b/TAO/tests/Smart_Proxies/Policy/run_test.pl
@@ -5,110 +5,108 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
-$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$iorfile1 = PerlACE::LocalFile ("test1.ior");
+$iorfile2 = PerlACE::LocalFile ("test2.ior");
unlink $iorfile1;
unlink $iorfile2;
+$SV1 = new PerlACE::Process ("server", "-o $iorfile1");
+$SV2 = new PerlACE::Process ("server", "-o $iorfile2");
+$CL = new PerlACE::Process ("client", "-i file://$iorfile1 -j file://$iorfile2");
+
print STDERR "\nrunning Smart Proxy test consisting of the client and two servers with <one-shot> policy\n\n";
-$SV1 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile1");
+$SV1->Spawn ();
-if (ACE::waitforfile_timed ($iorfile1, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile1>\n";
- $SV1->Kill (); $SV1->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile1, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile1>\n";
+ $SV1->Kill ();
+ exit 1;
}
-$SV2 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile2");
+$SV2->Spawn ();
-if (ACE::waitforfile_timed ($iorfile2, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile2, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT",
- "-i file://$iorfile1 -j file://$iorfile2");
+$client = $CL->SpawnWaitKill (60);
-$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;
}
-$server1 = $SV1->TimedWait (10);
-if ($server1 == -1) {
- print STDERR "ERROR: server1 timedout\n";
- $SV1->Kill (); $SV1->TimedWait (1);
+$server = $SV1->WaitKill (10);
+
+if ($server == -1) {
+ print STDERR "ERROR: server 1 returned $server\n";
+ $status = 1;
}
unlink $iorfile1;
-$server2 = $SV2->TimedWait (10);
-if ($server2 == -1) {
- print STDERR "ERROR: server2 timedout\n";
- $SV2->Kill (); $SV2->TimedWait (1);
+$server = $SV2->WaitKill (10);
+
+if ($server == -1) {
+ print STDERR "ERROR: server 2 returned $server\n";
+ $status = 1;
}
unlink $iorfile2;
-
print STDERR "\nrunning Smart Proxy test consisting of the client and two servers with <one-shot> policy disabled\n\n";
-$SV1 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile1");
+$SV1->Spawn ();
-if (ACE::waitforfile_timed ($iorfile1, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile1>\n";
- $SV1->Kill (); $SV1->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile1, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile1>\n";
+ $SV1->Kill ();
+ exit 1;
}
-$SV2 = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile2");
+$SV2->Spawn ();
-if (ACE::waitforfile_timed ($iorfile2, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile2>\n";
- $SV2->Kill (); $SV2->TimedWait (1);
- exit 1;
+if (PerlACE::waitforfile_timed ($iorfile2, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV1->Kill ();
+ $SV2->Kill ();
+ exit 1;
}
-$CL = Process::Create ($EXEPREFIX."client$EXE_EXT",
- "-f0 -i file://$iorfile1 -j file://$iorfile2");
+$CL->Arguments ("-f0 -i file://$iorfile1 -j file://$iorfile2");
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$client = $CL->SpawnWaitKill (60);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server1 = $SV1->TimedWait (10);
-if ($server1 == -1) {
- print STDERR "ERROR: server1 timedout\n";
- $SV1->Kill (); $SV1->TimedWait (1);
+$server = $SV1->WaitKill (10);
+
+if ($server == -1) {
+ print STDERR "ERROR: server 1 returned $server\n";
+ $status = 1;
}
unlink $iorfile1;
-$server2 = $SV2->TimedWait (10);
-if ($server2 == -1) {
- print STDERR "ERROR: server2 timedout\n";
- $SV2->Kill (); $SV2->TimedWait (1);
+$server = $SV2->WaitKill (10);
+
+if ($server == -1) {
+ print STDERR "ERROR: server 2 returned $server\n";
+ $status = 1;
}
unlink $iorfile2;
-if ($client != 0 || server != 0) {
- exit 1;
-}
+exit $status;
diff --git a/TAO/tests/Smart_Proxies/client.dsp b/TAO/tests/Smart_Proxies/client.dsp
index 28f538deef8..7d11300d2af 100644
--- a/TAO/tests/Smart_Proxies/client.dsp
+++ b/TAO/tests/Smart_Proxies/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/tests/Smart_Proxies/run_test.pl b/TAO/tests/Smart_Proxies/run_test.pl
index b6e9fff38d0..10b76ffd9ef 100755
--- a/TAO/tests/Smart_Proxies/run_test.pl
+++ b/TAO/tests/Smart_Proxies/run_test.pl
@@ -5,45 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
-$iorfile = "$cwd$DIR_SEPARATOR" . "test.ior";
-
-ACE::checkForTarget($cwd);
+$status = 0;
+$iorfile = PerlACE::LocalFile ("test.ior");
unlink $iorfile;
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-i file://$iorfile");
+
print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- " -o $iorfile");
+$SV->Spawn ();
-if (ACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+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",
- "-i file://$iorfile");
+$client = $CL->SpawnWaitKill (60);
-$client = $CL->TimedWait (60);
if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (10);
+$server = $SV->WaitKill (10);
+
if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
-if ($client != 0 || server != 0) {
- exit 1;
-}
+exit $status;
diff --git a/TAO/tests/Smart_Proxies/server.dsp b/TAO/tests/Smart_Proxies/server.dsp
index fe1963f2d64..5722aab9860 100644
--- a/TAO/tests/Smart_Proxies/server.dsp
+++ b/TAO/tests/Smart_Proxies/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/tests/Timed_Buffered_Oneways/run_test.pl b/TAO/tests/Timed_Buffered_Oneways/run_test.pl
index 2fadcbd6f1b..2d47ba4442e 100755
--- a/TAO/tests/Timed_Buffered_Oneways/run_test.pl
+++ b/TAO/tests/Timed_Buffered_Oneways/run_test.pl
@@ -7,7 +7,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "../../../bin";
use PerlACE::Run_Test;
-use Cwd;
$iorfile = PerlACE::LocalFile ("ior");
@@ -19,28 +18,27 @@ $CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
$SV->Spawn ();
if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
$client = $CL->SpawnWaitKill (200);
-if ($client == -1) {
- $time = localtime;
- print STDERR "ERROR: client timedout at $time\n";
+if ($client != 0) {
+ $time = localtime;
+ print STDERR "ERROR: client returned $client at $time\n";
+ $status = 1;
}
$server = $SV->WaitKill (100);
-if ($server == -1) {
- $time = localtime;
- print STDERR "ERROR: server timedout at $time\n";
+
+if ($server != 0) {
+ $time = localtime;
+ print STDERR "ERROR: server returned $server at $time\n";
+ $status = 1;
}
unlink $iorfile;
-if ($server != 0 || $client != 0) {
- exit 1;
-}
-
-exit 0;
+exit $status;
diff --git a/TAO/tests/Timeout/client.dsp b/TAO/tests/Timeout/client.dsp
index 3e2dfbf30ce..c5debacb5ac 100644
--- a/TAO/tests/Timeout/client.dsp
+++ b/TAO/tests/Timeout/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 Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
diff --git a/TAO/tests/Timeout/run_test.pl b/TAO/tests/Timeout/run_test.pl
index 017d45036b1..ca1399d3acc 100755
--- a/TAO/tests/Timeout/run_test.pl
+++ b/TAO/tests/Timeout/run_test.pl
@@ -5,44 +5,38 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require ACEutils;
-use Cwd;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-$cwd = getcwd();
$status = 0;
-$iorfile = "$cwd$DIR_SEPARATOR" . "server.ior";
+$iorfile = PerlACE::LocalFile ("server.ior");
unlink $iorfile;
-ACE::checkForTarget($cwd);
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", "-ORBDebugLevel 0 -k file://$iorfile -l 2 -h 28");
-$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
- " -o $iorfile");
-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 ",
- " -ORBDebugLevel 0"
- ." -k file://$iorfile "
- . " -l 2 -h 28");
+$client = $CL->SpawnWaitKill (60);
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- $status = 1;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-$server = $SV->TimedWait (5);
-if ($server == -1) {
- print STDERR "ERROR: server timedout\n";
- $SV->Kill (); $SV->TimedWait (1);
- $status = 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $iorfile;
diff --git a/TAO/tests/Timeout/server.dsp b/TAO/tests/Timeout/server.dsp
index d362990c185..bb5ea34e252 100644
--- a/TAO/tests/Timeout/server.dsp
+++ b/TAO/tests/Timeout/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/tests/Xt_Stopwatch/run_test.pl b/TAO/tests/Xt_Stopwatch/run_test.pl
index 57d8fdfbfc4..546d8c8b716 100755
--- a/TAO/tests/Xt_Stopwatch/run_test.pl
+++ b/TAO/tests/Xt_Stopwatch/run_test.pl
@@ -5,43 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
# -*- perl -*-
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
+use lib '../../../bin';
+use PerlACE::Run_Test;
-print STDERR "\n\n==== XtReactor demo test\n";
-
-$file="test.ior";
+$status = 0;
+$file = PerlACE::LocalFile ("test.ior");
unlink $file;
-$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT,
- "-o $file");
-if (ACE::waitforfile_timed ($file, 3) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
-}
+$SV = new PerlACE::Process ("server", "-o $file");
+$CL = new PerlACE::Process ("client", "file://$file");
-$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT,
- "file://$file");
+print STDERR "\n\n==== XtReactor demo test\n";
-$client = $CL->TimedWait (60);
-if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($file, 3) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\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;
}
-if ($client == -1 || $server == -1) {
- exit 1;
+$server = $SV->WaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-exit 0;
+exit $status;
diff --git a/TAO/tests/ior_corbaloc/run_test.pl b/TAO/tests/ior_corbaloc/run_test.pl
index 819ac3ee1c6..973496f2489 100755
--- a/TAO/tests/ior_corbaloc/run_test.pl
+++ b/TAO/tests/ior_corbaloc/run_test.pl
@@ -8,131 +8,100 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# This is a Perl Script that runs the corbaloc: style URL tests.
# It starts the servers and client.
-#use lib "../../../bin";
+use lib "../../../bin";
+use PerlACE::Run_Test;
-unshift @INC, '../../../bin';
-require Process;
-require ACEutils;
-require Uniqueid;
-use Cwd;
+$status = 0;
-$cwd = getcwd();
# Amount of delay (in seconds) between starting a server and a client
# to allow proper server initialization.
$sleeptime = 8;
# Variables for command-line arguments to client and server
# executables.
-$ns_multicast_port = 10001 + uniqueid (); # Can not be 10000 on Chorus 4.0
-$ns_orb_port = 12000 + uniqueid ();
-$iorfile = "$cwd$DIR_SEPARATOR" . "ns.ior";
-
-ACE::checkForTarget($cwd);
-
-sub name_server
-{
- my $args = "@_"." -ORBnameserviceport $ns_multicast_port -o $iorfile";
- my $prog = $EXEPREFIX."..$DIR_SEPARATOR..$DIR_SEPARATOR..$DIR_SEPARATOR".
- "TAO".$DIR_SEPARATOR."orbsvcs".$DIR_SEPARATOR.
- "Naming_Service".$DIR_SEPARATOR.
- "Naming_Service".$EXE_EXT;
-
- # Make sure the files are gone, so we can wait on them.
- unlink $iorfile;
-
- $NS = Process::Create ($prog, $args);
-
- if (ACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
- print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
- }
-}
-
-sub server
-{
- my $args = "@_"." -ORBInitRef NameService=file://$iorfile";
- my $prog = $EXEPREFIX."server".$EXE_EXT;
-
- $SR = Process::Create ($prog, $args);
-
- $server = $SR->TimedWait (20);
-}
-
-sub client
-{
- my $args = "@_"." -ORBInitRef NameService=file://$iorfile";
- my $prog = $EXEPREFIX."client".$EXE_EXT;
-
- $CL = Process::Create ($prog, $args);
-
- $client = $CL->TimedWait (60);
- if ($client == -1) {
- print STDERR "ERROR: client timedout\n";
- $CL->Kill (); $CL->TimedWait (1);
- }
-}
+$ns_multicast_port = 10001 + PerlACE::uniqueid (); # Can not be 10000 on Chorus 4.0
+$ns_orb_port = 12000 + PerlACE::uniqueid ();
+$iorfile = PerlACE::LocalFile ("ns.ior");
# Options for all simple tests recognized by the 'client' program.
@opts = ("corbaloc:rir:/NameService",
- "corbaloc:rir:/",
- "corbaloc:iiop://$TARGETHOSTNAME:$ns_orb_port/NameService",
- "corbaloc:iiop://:$ns_orb_port/NameService",
- "corbaloc:///NameService",
- "corbaloc://$TARGETHOSTNAME:$ns_orb_port/NameService");
+ "corbaloc:rir:/",
+ "corbaloc:iiop://$TARGETHOSTNAME:$ns_orb_port/NameService",
+ "corbaloc:iiop://:$ns_orb_port/NameService",
+ "corbaloc:///NameService",
+ "corbaloc://$TARGETHOSTNAME:$ns_orb_port/NameService");
$def_port = 2809;
@name_server_opts = ("-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
- "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
- "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
- "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
- "-ORBEndPoint iiop://$TARGETHOSTNAME:$def_port",
- "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port");
+ "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
+ "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
+ "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port",
+ "-ORBEndPoint iiop://$TARGETHOSTNAME:$def_port",
+ "-ORBEndPoint iiop://$TARGETHOSTNAME:$ns_orb_port");
@comments = ("Using RIR protocol with the Key object specified: \n",
- "Using RIR protocol without specifying the key object: \n",
- "Using IIOP protocol with the hostname, port specified: \n",
- "Using IIOP protocol with the hostname unspecified but port specified: \n",
- "Using IIOP protocol with both hostname & port unspecified: \n",
- "Using the default protocol (iiop) with the hostname, port specified: \n");
+ "Using RIR protocol without specifying the key object: \n",
+ "Using IIOP protocol with the hostname, port specified: \n",
+ "Using IIOP protocol with the hostname unspecified but port specified: \n",
+ "Using IIOP protocol with both hostname & port unspecified: \n",
+ "Using the default protocol (iiop) with the hostname, port specified: \n");
$test_number = 0;
# Run the naming service, server. Run the client for each of the test.
# Client uses ior in a file to bootstrap to the server.
-foreach $o (@opts)
-{
- name_server ($name_server_opts [$test_number]);
+$SR = new PerlACE::Process ("server");
+$CL = new PerlACE::Process ("client");
+$NS = new PerlACE::Process ("../../orbsvcs/Naming_Service/Naming_Service");
- print STDERR "\n ".$comments[$test_number];
+foreach $o (@opts) {
+ # Make sure the files are gone, so we can wait on them.
+ unlink $iorfile;
- server ();
+ $NS->Arguments ($name_server_opts [$test_number]
+ . " -ORBnameserviceport $ns_multicast_port -o $iorfile");
+
+ $NS->Spawn ();
- client ($o);
+ if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
+ print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
+ $NS->Kill ();
+ exit 1;
+ }
- $NS->Terminate ();
- $nser = $NS->TimedWait (60);
+ print STDERR "\n ".$comments[$test_number];
- if ($nser == -1)
- {
- print STDERR "ERROR: name server Timedout\n";
- $NS->Kill (); $NS->TimedWait (1);
- }
+ $SR->Arguments ("ORBInitRef NameService=file://$iorfile");
+ $SR->Spawn ();
+
+ sleep $sleeptime;
- $SR->Terminate ();
- $ser = $NS->TimedWait (60);
+ $CL->Arguments ("$o -ORBInitRef NameService=file://$iorfile");
+ $client = $CL->SpawnWaitKill (60);
+
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
+ }
+
+ $nameservice = $NS->TerminateWaitKill (10);
- if ($ser == -1)
- {
- $NS->Kill (); $NS->TimedWait (1);
+ if ($nameservice != 0) {
+ print STDERR "ERROR: name server returned $nameservice\n";
+ $status = 1;
}
- $test_number++;
+ $server = $SR->TerminateWaitKill (10);
+ if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
+ }
+ $test_number++;
}
-exit 0;
+exit $status;