summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-09 10:43:57 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-09 10:43:57 +0000
commit4a83d8eba51f78ed7708e3f34db2194970768e71 (patch)
tree0e45153c082770ed4da90b9ce0b05eae72663850
parentd4ec59d6bde56bc46b9a7d6af894dbc448bd1676 (diff)
downloadATCD-4a83d8eba51f78ed7708e3f34db2194970768e71.tar.gz
Wed Dec 9 10:38:26 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/CosEvent/Basic/run_test.pl: * orbsvcs/tests/Bug_1334_Regression/run_test.pl: * orbsvcs/tests/Notify/Timeout/run_test.pl: * orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl: * orbsvcs/tests/Notify/MT_Dispatching/run_test.pl: * orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl: * orbsvcs/tests/Notify/Persistent_POA/run_test.pl: * orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl: * orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl: * orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl: * orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl: * orbsvcs/tests/Notify/Ordering/run_test.pl: * orbsvcs/tests/Notify/Reconnecting/run_test.pl: * orbsvcs/tests/Notify/Basic/run_test_ipv6.pl: * orbsvcs/tests/Notify/Basic/run_test.pl: * orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl: * orbsvcs/tests/Notify/Blocking/run_test.pl: * orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl: * orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl: * orbsvcs/tests/Notify/MC/run_test.pl: * orbsvcs/tests/Notify/Lanes/run_test.pl: * orbsvcs/tests/Notify/Discarding/run_test.pl: * orbsvcs/tests/Notify/Structured_Filter/run_test.pl: * orbsvcs/tests/Event/Basic/run_test.pl: * orbsvcs/tests/Event/Performance/run_test.pl: * orbsvcs/tests/Bug_1393_Regression/run_test.pl: * orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl: * performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl: * performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl: * tests/Bug_1476_Regression/run_test.pl: * tests/Bug_2494_Regression/run_test.pl: * tests/POA/Adapter_Activator/run_test.pl: * tests/POA/Explicit_Activation/run_test.pl: * tests/POA/On_Demand_Activation/run_test.pl: * tests/POA/Loader/run_test.pl: * tests/POA/On_Demand_Loading/run_test.pl: * tests/POA/Reference_Counted_Servant/run_test.pl: * tests/Collocation/run_test.pl: * tests/CodeSets/simple/run_test.pl: * tests/CSD_Strategy_Tests/Broken/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl: * tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl: * tests/Oneway_Timeouts/run_test.pl: * tests/Smart_Proxies/On_Demand/server.cpp: * tests/Smart_Proxies/On_Demand/run_test.pl: * tests/Smart_Proxies/Benchmark/server.cpp: * tests/Smart_Proxies/Benchmark/run_test.pl: * tests/Bug_3676_Regression/run_test.pl: * tests/Oneways_Invoking_Twoways/run_test_svc.pl: * bin/tao_other_tests.lst: Tests are converted to use new test framework and added to fuzz build.
-rw-r--r--TAO/ChangeLog61
-rw-r--r--TAO/bin/tao_other_tests.lst6
-rwxr-xr-xTAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl122
-rwxr-xr-xTAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl157
-rwxr-xr-xTAO/orbsvcs/tests/CosEvent/Basic/run_test.pl3
-rwxr-xr-xTAO/orbsvcs/tests/Event/Basic/run_test.pl4
-rwxr-xr-xTAO/orbsvcs/tests/Event/Performance/run_test.pl4
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl17
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Basic/run_test.pl6
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Basic/run_test_ipv6.pl6
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Blocking/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl7
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl6
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl6
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl8
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Discarding/run_test.pl13
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Lanes/run_test.pl7
-rwxr-xr-xTAO/orbsvcs/tests/Notify/MC/run_test.pl10
-rwxr-xr-xTAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl7
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Ordering/run_test.pl21
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Persistent_POA/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Reconnecting/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl7
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl7
-rwxr-xr-xTAO/orbsvcs/tests/Notify/Timeout/run_test.pl5
-rwxr-xr-xTAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl313
-rwxr-xr-xTAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl7
-rwxr-xr-xTAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl4
-rwxr-xr-xTAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl4
-rwxr-xr-xTAO/tests/Bug_1476_Regression/run_test.pl65
-rwxr-xr-xTAO/tests/Bug_2494_Regression/run_test.pl88
-rwxr-xr-xTAO/tests/Bug_3676_Regression/run_test.pl8
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/Broken/run_test.pl13
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl14
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl12
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl12
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl13
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl16
-rwxr-xr-xTAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl10
-rwxr-xr-xTAO/tests/CodeSets/simple/run_test.pl9
-rwxr-xr-xTAO/tests/Collocation/run_test.pl4
-rwxr-xr-xTAO/tests/Oneway_Timeouts/run_test.pl4
-rwxr-xr-xTAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl71
-rwxr-xr-xTAO/tests/POA/Adapter_Activator/run_test.pl3
-rwxr-xr-xTAO/tests/POA/Explicit_Activation/run_test.pl5
-rwxr-xr-xTAO/tests/POA/Loader/run_test.pl9
-rwxr-xr-xTAO/tests/POA/On_Demand_Activation/run_test.pl5
-rwxr-xr-xTAO/tests/POA/On_Demand_Loading/run_test.pl5
-rwxr-xr-xTAO/tests/POA/Reference_Counted_Servant/run_test.pl4
-rwxr-xr-xTAO/tests/Smart_Proxies/Benchmark/run_test.pl63
-rw-r--r--TAO/tests/Smart_Proxies/Benchmark/server.cpp5
-rwxr-xr-xTAO/tests/Smart_Proxies/On_Demand/run_test.pl64
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/server.cpp5
56 files changed, 828 insertions, 527 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index b71cc4e2d62..d0111b40e01 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,64 @@
+Wed Dec 9 10:38:26 UTC 2009 Denis Budko <denis.budko@remedy.nl>
+
+ * orbsvcs/tests/CosEvent/Basic/run_test.pl:
+ * orbsvcs/tests/Bug_1334_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Timeout/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/MT_Dispatching/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Persistent_POA/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl:
+ * orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Ordering/run_test.pl:
+ * orbsvcs/tests/Notify/Reconnecting/run_test.pl:
+ * orbsvcs/tests/Notify/Basic/run_test_ipv6.pl:
+ * orbsvcs/tests/Notify/Basic/run_test.pl:
+ * orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl:
+ * orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl:
+ * orbsvcs/tests/Notify/Blocking/run_test.pl:
+ * orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl:
+ * orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl:
+ * orbsvcs/tests/Notify/MC/run_test.pl:
+ * orbsvcs/tests/Notify/Lanes/run_test.pl:
+ * orbsvcs/tests/Notify/Discarding/run_test.pl:
+ * orbsvcs/tests/Notify/Structured_Filter/run_test.pl:
+ * orbsvcs/tests/Event/Basic/run_test.pl:
+ * orbsvcs/tests/Event/Performance/run_test.pl:
+ * orbsvcs/tests/Bug_1393_Regression/run_test.pl:
+ * orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl:
+ * performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl:
+ * performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl:
+ * tests/Bug_1476_Regression/run_test.pl:
+ * tests/Bug_2494_Regression/run_test.pl:
+ * tests/POA/Adapter_Activator/run_test.pl:
+ * tests/POA/Explicit_Activation/run_test.pl:
+ * tests/POA/On_Demand_Activation/run_test.pl:
+ * tests/POA/Loader/run_test.pl:
+ * tests/POA/On_Demand_Loading/run_test.pl:
+ * tests/POA/Reference_Counted_Servant/run_test.pl:
+ * tests/Collocation/run_test.pl:
+ * tests/CodeSets/simple/run_test.pl:
+ * tests/CSD_Strategy_Tests/Broken/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl:
+ * tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl:
+ * tests/Oneway_Timeouts/run_test.pl:
+ * tests/Smart_Proxies/On_Demand/server.cpp:
+ * tests/Smart_Proxies/On_Demand/run_test.pl:
+ * tests/Smart_Proxies/Benchmark/server.cpp:
+ * tests/Smart_Proxies/Benchmark/run_test.pl:
+ * tests/Bug_3676_Regression/run_test.pl:
+ * tests/Oneways_Invoking_Twoways/run_test_svc.pl:
+ * bin/tao_other_tests.lst:
+
+ Tests are converted to use new test framework
+ and added to fuzz build.
+
Wed Dec 9 10:11:14 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/be/be_provides.cpp:
diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst
index 3e23ecf2ef2..3f9f20fba13 100644
--- a/TAO/bin/tao_other_tests.lst
+++ b/TAO/bin/tao_other_tests.lst
@@ -51,8 +51,8 @@ TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/run_test.pl -p SCTP_SEQ: !
TAO/orbsvcs/tests/AVStreams/Simple_Three_Stage/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !DISABLE_ToFix_LynxOS_x86 !LynxOS
TAO/orbsvcs/tests/AVStreams/Asynch_Three_Stage/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
TAO/orbsvcs/tests/AVStreams/Component_Switching/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !LynxOS
-TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl: !ACE_FOR_TAO !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
-TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_IFR !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !WCHAR
+TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl: !ACE_FOR_TAO !CORBA_E_MICRO !DISTRIBUTED
+TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_IFR !ACE_FOR_TAO !WCHAR
TAO/orbsvcs/tests/Bug_1395_Regression/run_test.pl: !LynxOS !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !WCHAR
TAO/orbsvcs/tests/Bug_1436_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_IFR !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !WCHAR
TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !WCHAR
@@ -139,7 +139,7 @@ TAO/orbsvcs/tests/Notify/Discarding/run_test.pl: !ST !NO_MESSAGING !MINIMUM !COR
TAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
TAO/orbsvcs/tests/Notify/Ordering/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !DISABLE_ToFix_LynxOS_x86
TAO/orbsvcs/tests/Notify/Timeout/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
-TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !IRIX !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
+TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !IRIX !ACE_FOR_TAO
TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO
diff --git a/TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl
index 649b436b049..b56a844d301 100755
--- a/TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Bug_1334_Regression/run_test.pl
@@ -8,27 +8,45 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
+
+$status = 0;
+$debug_level = '0';
+
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+my $ns = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
# The NameService IOR file
#
-$nsiorfile = PerlACE::LocalFile("ns.ior");
-unlink $nsiorfile;
+$nsiorfile = "ns.ior";
+
+my $ns_nsiorfile = $ns->LocalFile ($nsiorfile);
+$ns->DeleteFile ($nsiorfile);
# The client process
#
-$CLIENT = new PerlACE::Process(PerlACE::LocalFile("client"));
+$CLI = $ns->CreateProcess ("client");
# Fire up the Name Service
#
-$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $nsiorfile");
-$NS->Spawn ();
-
-if (PerlACE::waitforfile_timed ($nsiorfile, $PerlACE::wait_interval_for_process_creation) == -1)
-{
- print STDERR "ERROR: cannot find Name Service IOR file <$nsiorfile>\n";
- $NS->Kill (); $NS->TimedWait (1);
- exit 1;
+$NS = $ns->CreateProcess ("../../Naming_Service/Naming_Service",
+ "-ORBDebugLevel $debug_level ".
+ "-o $ns_nsiorfile");
+$NS_status = $NS->Spawn ();
+if ($NS_status != 0) {
+ print STDERR "ERROR: Name Service returned $NS_status\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+if ($ns->WaitForFileTimed ($nsiorfile,$ns->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$ns_nsiorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
}
@@ -36,37 +54,33 @@ if (PerlACE::waitforfile_timed ($nsiorfile, $PerlACE::wait_interval_for_process_
# the form <service name>IOR.
# Expect it to succeed.
#
-$ENV {'NameServiceIOR'} = "file://$nsiorfile";
-$CLIENT->Arguments("");
-if ($CLIENT->SpawnWaitKill (30) != 0)
-{
- print STDERR "ERROR: Name Service not resolved by environment variable\n";
- $server = $NS->TerminateWaitKill (5);
- if ($server != 0)
- {
- print STDERR "ERROR: Closing Name Service returned $server\n";
- $status = 1;
- }
- unlink $nsiorfile;
- exit 1;
+$ENV {'NameServiceIOR'} = "file://$ns_nsiorfile";
+$CLI->Arguments("");
+$CLI_status = $CLI->SpawnWaitKill ($ns->ProcessStartWaitInterval()+15);
+if ($CLI_status != 0) {
+ print STDERR "ERROR: Name Service not resolved by environment variable\n";
+ $NS_status = $NS->TerminateWaitKill ($ns->ProcessStopWaitInterval());
+ if ($NS_status != 0) {
+ print STDERR "ERROR: Closing Name Service returned $NS_status\n";
+ }
+ $ns->DeleteFile ($nsiorfile);
+ exit 1;
}
# Now try it with a duff ior in the environment variable.
# Expect it to fail.
#
$ENV {'NameServiceIOR'} = "Banana";
-$CLIENT->Arguments("");
-if ($CLIENT->SpawnWaitKill (30) != 1)
-{
- print STDERR "ERROR: Name Service resolved with duff environment\n";
- $server = $NS->TerminateWaitKill (5);
- if ($server != 0)
- {
- print STDERR "ERROR: Closing Name Service returned $server\n";
- $status = 1;
- }
- unlink $nsiorfile;
- exit 1;
+$CLI->Arguments("");
+$CLI_status = $CLI->SpawnWaitKill ($ns->ProcessStartWaitInterval()+15);
+if ($CLI_status != 1) {
+ print STDERR "ERROR: Name Service resolved with duff environment\n";
+ $NS_status = $NS->TerminateWaitKill ($ns->ProcessStopWaitInterval());
+ if ($NS_status != 0) {
+ print STDERR "ERROR: Closing Name Service returned $NS_status\n";
+ }
+ $ns->DeleteFile ($nsiorfile);
+ exit 1;
}
# Now try with a duff ior in the environment variable but overridden by
@@ -74,28 +88,26 @@ if ($CLIENT->SpawnWaitKill (30) != 1)
# Expect it to succeed.
#
$ENV {'NameServiceIOR'} = "Custard";
-$CLIENT->Arguments("-ORBInitRef NameService=file://$nsiorfile");
-if ($CLIENT->SpawnWaitKill (30) != 0)
-{
- print STDERR "ERROR: Name Service not resolved by command line override\n";
- $server = $NS->TerminateWaitKill (5);
- if ($server != 0)
- {
- print STDERR "ERROR: Closing Name Service returned $server\n";
- $status = 1;
- }
- unlink $nsiorfile;
- exit 1;
+$CLI->Arguments("-ORBInitRef NameService=file://$ns_nsiorfile");
+$CLI_status = $CLI->SpawnWaitKill ($ns->ProcessStartWaitInterval()+15);
+if ($CLI_status != 0) {
+ print STDERR "ERROR: Name Service not resolved by command line override\n";
+ $NS_status = $NS->TerminateWaitKill ($ns->ProcessStopWaitInterval());
+ if ($NS_status != 0) {
+ print STDERR "ERROR: Closing Name Service returned $NS_status\n";
+ }
+ $ns->DeleteFile ($nsiorfile);
+ exit 1;
}
# Clean up and return
#
-$server = $NS->TerminateWaitKill (5);
-if ($server != 0)
-{
- print STDERR "ERROR: Closing Name Service returned $server\n";
+$NS_status = $NS->TerminateWaitKill ($ns->ProcessStopWaitInterval());
+if ($NS_status != 0) {
+ print STDERR "ERROR: Closing Name Service returned $NS_status\n";
$status = 1;
}
-unlink $nsiorfile;
-exit 0;
+$ns->DeleteFile ($nsiorfile);
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl
index d76f348e5bc..a8832ba2f0a 100755
--- a/TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Bug_1393_Regression/run_test.pl
@@ -6,105 +6,146 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# $Id$
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
+my @generated_files = ("testC.h", "testC.cpp", "testC.inl", "testS.h", "testS.cpp", "testS.inl");
+
# The location of the IFR_Service binary
-$ifr_service_bin = "../../IFR_Service";
+my $ifr_service_bin = "../../IFR_Service";
# The location of the tao_ifr utility binary
-$tao_ifr_bin = "$ENV{ACE_ROOT}/bin";
+my $tao_ifr_bin = "$ENV{ACE_ROOT}/bin";
# The location of the tao_idl utility binary
-$tao_idl_bin = "$ENV{ACE_ROOT}/bin";
+my $tao_idl_bin = "$ENV{ACE_ROOT}/bin";
+my $service = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+my $taoifr = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+
# The idl file to be used for the test
-$test_idl = PerlACE::LocalFile("test.idl");
+my $test_idl = "test.idl";
+my $ifr_ior = "ifr.ior";
+my $service_test_idl = $service->LocalFile ($test_idl);
+my $taoifr_test_idl = $taoifr->LocalFile ($test_idl);
+my $service_ifr_ior = $service->LocalFile($ifr_ior);
+my $taoifr_ifr_ior = $taoifr->LocalFile($ifr_ior);
+my $client_ifr_ior = $client->LocalFile($ifr_ior);
+$service->DeleteFile ($ifr_ior);
+$client->DeleteFile ($ifr_ior);
+$taoifr->DeleteFile ($ifr_ior);
+
+$TAO_IDL = $service->CreateProcess("$tao_idl_bin/tao_idl", "$service_test_idl");
+$IFR_SERVICE = $service->CreateProcess("$ifr_service_bin/IFR_Service", "-o $service_ifr_ior");
+$TAO_IFR = $service->CreateProcess("$tao_ifr_bin/tao_ifr",
+ "-ORBInitRef InterfaceRepository=file://$taoifr_ifr_ior ".
+ "$taoifr_test_idl");
+$CL = $client->CreateProcess("client", "-ORBInitRef InterfaceRepository=file://$client_ifr_ior");
# Create an idl file contaning an interface with a C++ reserved word name
-open(HANDLE, ">$test_idl");
+open(HANDLE, ">$service_test_idl");
print HANDLE <<_EOF_
-interface int
-{
+interface int {
};
_EOF_
;
close(HANDLE);
-$TAO_IDL = new PerlACE::Process("$tao_idl_bin/tao_idl");
-$TAO_IDL->Arguments("$test_idl");
-$result = $TAO_IDL->SpawnWaitKill (30);
+my $result = $TAO_IDL->SpawnWaitKill ($service->ProcessStartWaitInterval() + 15);
# Search one of the stub files for the munged for of the interface name
-if ($result == 0)
-{
- $result = 1;
- open (HANDLE, "<testC.h");
- while (<HANDLE>)
- {
- if (/^class\s+_cxx_int/)
- {
- $result = 0;
- last;
- }
- }
- close(HANDLE);
+if ($result == 0) {
+ $result = 1;
+ open (HANDLE, "<testC.h");
+ while (<HANDLE>) {
+ if (/^class\s+_cxx_int/) {
+ $result = 0;
+ last;
+ }
+ }
+ close (HANDLE);
}
# Check result of idl compiler test
-if ($result != 0)
-{
- print STDERR "ERROR: Bug #1393 Idl compiler test failed\n";
- $status = 1;
+if ($result != 0) {
+ print STDERR "ERROR: Bug #1393 Idl compiler test failed\n";
+ $status = 1;
}
# Delete files created during IDL compilation
-unlink <test*.h>;
-unlink <test*.cpp>;
-unlink <test*.inl>;
-
-# The file name for the IFR service IOR
-$ifr_service_ior_file = PerlACE::LocalFile("ifr.ior");
-unlink $ifr_service_ior_file;
-
+foreach $file(@generated_files) {
+ $service->DeleteFile ($file)
+}
+
# Start the IFR service
-$IFR_SERVICE = new PerlACE::Process("$ifr_service_bin/IFR_Service");
-$IFR_SERVICE->Arguments("-o $ifr_service_ior_file");
-$IFR_SERVICE->Spawn();
-
-if (PerlACE::waitforfile_timed ($ifr_service_ior_file, $PerlACE::wait_interval_for_process_creation) == -1)
-{
- print STDERR "ERROR: cannot find $ifr_service_ior_file\n";
- $IFR_SERVICE->Kill ();
- $status = 1;
+$result = $IFR_SERVICE->Spawn();
+
+if ($result != 0) {
+ print STDERR "ERROR: IFR service returned $result\n";
+ exit 1;
+}
+
+if ($service->WaitForFileTimed ($ifr_ior, $service->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find $service_ifr_ior\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ $status = 1;
+}
+
+if ($service->GetFile ($test_idl) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$service_test_idl>\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ exit 1;
+}
+
+if ($service->GetFile ($ifr_ior) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$service_ifr_ior>\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ exit 1;
+}
+
+if ($taoifr->PutFile ($test_idl) == -1) {
+ print STDERR "ERROR: cannot set file <$taoifr_test_idl>\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ exit 1;
+}
+
+if ($taoifr->PutFile ($ifr_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$taoifr_ifr_ior>\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ exit 1;
+}
+
+if ($client->PutFile ($ifr_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$client_ifr_ior>\n";
+ $IFR_SERVICE->Kill (); $IFR_SERVICE->TimedWait (1);
+ exit 1;
}
# Use the iao_ifr utility to add our test IDL
-$TAO_IFR = new PerlACE::Process("$tao_ifr_bin/tao_ifr");
-$TAO_IFR->Arguments("-ORBInitRef InterfaceRepository=file://$ifr_service_ior_file $test_idl");
-$result = $TAO_IFR->SpawnWaitKill (30);
+$result = $TAO_IFR->SpawnWaitKill ($taoifr->ProcessStartWaitInterval() + 15);
-if ($result != 0)
-{
+if ($result != 0) {
print STDERR "ERROR: Failed to add IDL to interface repository\n";
$status = 1;
}
# Invoke the client code that retrieves the interface and checks it's not munged
-$CLIENT = new PerlACE::Process("client");
-$CLIENT->Arguments("-ORBInitRef InterfaceRepository=file://$ifr_service_ior_file");
-$result = $CLIENT->SpawnWaitKill (30);
+$result = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 15);
-if ($result != 0)
-{
+if ($result != 0) {
print STDERR "ERROR: Interface definition incorrect in IFR\n";
$status = 1;
}
# Tidy up
-$IFR_SERVICE->TerminateWaitKill (10);
-unlink $test_idl;
-unlink $ifr_service_ior_file;
+$IFR_SERVICE->TerminateWaitKill ($service->ProcessStopWaitInterval());
+
+$service->DeleteFile ($test_idl);
+$taoifr->DeleteFile ($test_idl);
+$service->DeleteFile ($ifr_ior);
+$client->DeleteFile ($ifr_ior);
+$taoifr->DeleteFile ($ifr_ior);
exit $status;
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
index 083c9c9665e..305e0e4bd2f 100755
--- a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl
@@ -10,7 +10,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../lib');
$status = 0;
$debug_level = '0';
@@ -23,6 +22,8 @@ foreach $i (@ARGV) {
my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$test->AddLibPath ('../lib');
+
my $svc_pull_conf = "svc.pull$PerlACE::svcconf_ext";
my $test_svc_pull_conf = $test->LocalFile ("svc.pull$PerlACE::svcconf_ext");
diff --git a/TAO/orbsvcs/tests/Event/Basic/run_test.pl b/TAO/orbsvcs/tests/Event/Basic/run_test.pl
index 5090d9909cd..7a2f65a7226 100755
--- a/TAO/orbsvcs/tests/Event/Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/Event/Basic/run_test.pl
@@ -11,10 +11,10 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../lib');
-
my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$test->AddLibPath ('../lib');
+
$status = 0;
my $conf_suffix = "$PerlACE::svcconf_ext";
diff --git a/TAO/orbsvcs/tests/Event/Performance/run_test.pl b/TAO/orbsvcs/tests/Event/Performance/run_test.pl
index ddc54786240..d2f0a3b4a35 100755
--- a/TAO/orbsvcs/tests/Event/Performance/run_test.pl
+++ b/TAO/orbsvcs/tests/Event/Performance/run_test.pl
@@ -11,12 +11,12 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../lib');
-
$status = 0;
my $test = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$test->AddLibPath ('../lib');
+
$ec_st_conf = $test->LocalFile ("ec.st$PerlACE::svcconf_ext");
sub RunTest ($$$)
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl
index a2e53d2878e..ade44a59b4a 100755
--- a/TAO/orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl
+++ b/TAO/orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl
@@ -103,13 +103,13 @@ $nice = "";
$ifrflags = '-Si';
-my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
-my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-my $iorbase = "if_repo.ior";
+$iorbase = "if_repo.ior";
-my $server_iorfile = $server->LocalFile ($iorbase);
-my $client_iorfile = $client->LocalFile ($iorbase);
+$server_iorfile = $server->LocalFile ($iorbase);
+$client_iorfile = $client->LocalFile ($iorbase);
$server->DeleteFile($iorbase);
$client->DeleteFile($iorbase);
@@ -124,9 +124,10 @@ $CL = $client->CreateProcess ("$ENV{ACE_ROOT}/bin/tao_ifr",
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
diff --git a/TAO/orbsvcs/tests/Notify/Basic/run_test.pl b/TAO/orbsvcs/tests/Notify/Basic/run_test.pl
index 58cbd808655..d9fdd876419 100755
--- a/TAO/orbsvcs/tests/Notify/Basic/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Basic/run_test.pl
@@ -21,7 +21,9 @@ my $ns = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n
my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $test = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$test->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -127,7 +129,7 @@ for $config (@test_configs) {
}
print STDERR "\nTesting Notification Service with config file = $config ....\n\n";
-
+
my $nfs_config = $nfs->LocalFile ($config);
$NFS = $nfs->CreateProcess ("../../../Notify_Service/Notify_Service",
diff --git a/TAO/orbsvcs/tests/Notify/Basic/run_test_ipv6.pl b/TAO/orbsvcs/tests/Notify/Basic/run_test_ipv6.pl
index e79866d9f82..2199f06eedf 100755
--- a/TAO/orbsvcs/tests/Notify/Basic/run_test_ipv6.pl
+++ b/TAO/orbsvcs/tests/Notify/Basic/run_test_ipv6.pl
@@ -21,7 +21,9 @@ my $ns = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n
my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $test = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$test->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -127,7 +129,7 @@ for $config (@test_configs) {
}
print STDERR "\nTesting Notification Service with config file = $config ....\n\n";
-
+
my $nfs_config = $nfs->LocalFile ($config);
$NFS = $nfs->CreateProcess ("../../../Notify_Service/Notify_Service",
diff --git a/TAO/orbsvcs/tests/Notify/Blocking/run_test.pl b/TAO/orbsvcs/tests/Notify/Blocking/run_test.pl
index ba3168f65f2..5bedb41b3d8 100755
--- a/TAO/orbsvcs/tests/Notify/Blocking/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Blocking/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl
index 6b15a333c89..50017ae3e9a 100755
--- a/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Bug_1385_Regression/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl b/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl
index d47df1a92db..03b0765676b 100755
--- a/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Bug_2415_Regression/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -47,7 +50,7 @@ $nfs->DeleteFile ($nfsiorfile);
$sup->DeleteFile ($supiorfile);
$con->DeleteFile ($supiorfile);
-$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
+$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
" -ORBEndpoint iiop://$ns_host:$ns_port");
$NFS = $nfs->CreateProcess ("../../../Notify_Service/Notify_Service",
diff --git a/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl b/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl
index 0d12b9bfaab..98c646f0a6c 100755
--- a/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Bug_2561_Regression/run_test.pl
@@ -23,7 +23,11 @@ my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\
my $con1 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
my $con2 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con1->AddLibPath ('../lib');
+$con2->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl b/TAO/orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl
index cad8e04ed4b..697b49cb086 100755
--- a/TAO/orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Bug_3646a_Regression/run_test.pl
@@ -8,8 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../lib');
-
$status = 0;
$debug_level = '0';
@@ -23,6 +21,10 @@ my $server1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 fai
my $server2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $client = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+$server1->AddLibPath ('../lib');
+$server2->AddLibPath ('../lib');
+$client->AddLibPath ('../lib');
+
my $ior1file = "naming.ior";
my $ior2file = "notify.ior";
diff --git a/TAO/orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl b/TAO/orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl
index 9fe284199bd..5d7f73812fd 100755
--- a/TAO/orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Bug_3646c_Regression/run_test.pl
@@ -8,13 +8,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../lib');
-
$status = 0;
$debug_level = '0';
-
-
foreach $i (@ARGV) {
if ($i eq '-debug') {
$debug_level = '10';
@@ -25,6 +21,10 @@ my $server1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 fai
my $server2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $client = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+$server1->AddLibPath ('../lib');
+$server2->AddLibPath ('../lib');
+$client->AddLibPath ('../lib');
+
my $ior1file = "naming.ior";
my $ior2file = "notify.ior";
diff --git a/TAO/orbsvcs/tests/Notify/Discarding/run_test.pl b/TAO/orbsvcs/tests/Notify/Discarding/run_test.pl
index 38d7b456d1a..020551570b1 100755
--- a/TAO/orbsvcs/tests/Notify/Discarding/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Discarding/run_test.pl
@@ -24,7 +24,12 @@ my $stc = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\
my $ses = PerlACE::TestTarget::create_target (5) || die "Create target 5 failed\n";
my $sec = PerlACE::TestTarget::create_target (6) || die "Create target 6 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sts->AddLibPath ('../lib');
+$stc->AddLibPath ('../lib');
+$ses->AddLibPath ('../lib');
+$sec->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -66,7 +71,7 @@ foreach my $arg (@ARGV) {
}
}
-$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
+$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
"-ORBEndpoint iiop://$host:$port ".
"-o $ns_nsiorfile");
@@ -77,7 +82,7 @@ $NFS = $nfs->CreateProcess ("../../../Notify_Service/Notify_Service",
"$nfs_nfsconffile");
$STS = $sts->CreateProcess ("Structured_Supplier",
- "-ORBDebugLevel $debug_level ".
+ "-ORBDebugLevel $debug_level ".
"-ORBInitRef NameService=iioploc://".
"$host:$port/NameService ".
"-o $sts_stsiorfile");
@@ -85,7 +90,7 @@ $STS = $sts->CreateProcess ("Structured_Supplier",
$STC = $stc->CreateProcess ("Structured_Consumer");
$SES = $ses->CreateProcess ("Sequence_Supplier",
- "-ORBDebugLevel $debug_level ".
+ "-ORBDebugLevel $debug_level ".
"-ORBInitRef NameService=iioploc://".
"$host:$port/NameService ".
"-o $ses_sesiorfile");
diff --git a/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl
index af5a869b954..94451f71771 100755
--- a/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Lanes/run_test.pl
@@ -8,8 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ("../lib");
-
PerlACE::check_privilege_group();
$status = 0;
@@ -29,6 +27,11 @@ my $server2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 fai
my $client1 = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $client2 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
+$server1->AddLibPath ("../lib");
+$server2->AddLibPath ("../lib");
+$client1->AddLibPath ("../lib");
+$client2->AddLibPath ("../lib");
+
my $ior1file = "naming.ior";
my $ior2file = "notify.ior";
my $client_ior = "supplier.ior";
diff --git a/TAO/orbsvcs/tests/Notify/MC/run_test.pl b/TAO/orbsvcs/tests/Notify/MC/run_test.pl
index 8378c3c6e83..dc40c74cd53 100755
--- a/TAO/orbsvcs/tests/Notify/MC/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/MC/run_test.pl
@@ -23,7 +23,11 @@ my $mon = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\
my $sup = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
my $con = PerlACE::TestTarget::create_target (5) || die "Create target 5 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$mon->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -77,8 +81,8 @@ if($static_build){
"-ORBArg -ORBInitRef ".
"-ORBArg NameService=corbaloc:iiop:$host:$port/NameService" .
"\"\n";
-}
-close(FH);
+}
+close(FH);
if ($nfs->PutFile ($notify_conf) == -1) {
print STDERR "ERROR: cannot set file <$nfs_notify_conf>\n";
diff --git a/TAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl b/TAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl
index b69d815f783..031cf277a9b 100755
--- a/TAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/MT_Dispatching/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -120,7 +123,7 @@ for $test (@tests) {
$nfs->DeleteFile ($nfsiorfile);
my $config = $test->{config};
my $nfs_config = $nfs->LocalFile ($config);
-
+
$NFS->Arguments ($NFS_Args . " -ORBSvcConf $nfs_config");
$args = $NFS->Arguments ();
print STDERR "Running Notification with arguments: $args\n";
diff --git a/TAO/orbsvcs/tests/Notify/Ordering/run_test.pl b/TAO/orbsvcs/tests/Notify/Ordering/run_test.pl
index b19c8c247be..af219403757 100755
--- a/TAO/orbsvcs/tests/Notify/Ordering/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Ordering/run_test.pl
@@ -24,7 +24,12 @@ my $stc = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\
my $ses = PerlACE::TestTarget::create_target (5) || die "Create target 5 failed\n";
my $sec = PerlACE::TestTarget::create_target (6) || die "Create target 6 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$ns->AddLibPath ('../lib');
+$sts->AddLibPath ('../lib');
+$stc->AddLibPath ('../lib');
+$ses->AddLibPath ('../lib');
+$sec->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -66,7 +71,7 @@ foreach my $arg (@ARGV) {
}
}
-$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
+$NS = $ns->CreateProcess ("../../../Naming_Service/Naming_Service",
"-ORBEndpoint iiop://$host:$port ".
"-o $ns_nsiorfile");
@@ -77,7 +82,7 @@ $NFS = $nfs->CreateProcess ("../../../Notify_Service/Notify_Service",
"$nfs_nfsconffile");
$STS = $sts->CreateProcess ("Structured_Supplier",
- "-ORBDebugLevel $debug_level ".
+ "-ORBDebugLevel $debug_level ".
"-ORBInitRef NameService=iioploc://".
"$host:$port/NameService ".
"-o $sts_stsiorfile");
@@ -85,7 +90,7 @@ $STS = $sts->CreateProcess ("Structured_Supplier",
$STC = $stc->CreateProcess ("Structured_Consumer");
$SES = $ses->CreateProcess ("Sequence_Supplier",
- "-ORBDebugLevel $debug_level ".
+ "-ORBDebugLevel $debug_level ".
"-ORBInitRef NameService=iioploc://".
"$host:$port/NameService ".
"-o $ses_sesiorfile");
@@ -209,7 +214,7 @@ if ($stc->PutFile ($stsiorfile) == -1) {
$NFS->Kill (); $NFS->TimedWait (1);
exit 1;
}
-sleep 2;
+sleep 2;
$STC->Arguments($CLI_args . " -k file://$stc_stsiorfile -d priority -o");
$STC_status = $STC->SpawnWaitKill ($stc->ProcessStartWaitInterval()+5);
@@ -262,7 +267,7 @@ if ($sec->PutFile ($stsiorfile) == -1) {
$NFS->Kill (); $NFS->TimedWait (1);
exit 1;
}
-sleep 2;
+sleep 2;
$SEC->Arguments($CLI_args . " -k file://$sec_stsiorfile -d priority -o");
$SEC_status = $SEC->SpawnWaitKill ($sec->ProcessStartWaitInterval()+5);
@@ -315,7 +320,7 @@ if ($stc->PutFile ($sesiorfile) == -1) {
$NFS->Kill (); $NFS->TimedWait (1);
exit 1;
}
-sleep 2;
+sleep 2;
$STC->Arguments($CLI_args . " -k file://$stc_sesiorfile -d priority -o");
$STC_status = $STC->SpawnWaitKill ($stc->ProcessStartWaitInterval()+5);
@@ -367,7 +372,7 @@ if ($sec->PutFile ($sesiorfile) == -1) {
$NFS->Kill (); $NFS->TimedWait (1);
exit 1;
}
-sleep 2;
+sleep 2;
$SEC->Arguments($CLI_args . " -k file://$sec_sesiorfile -d priority -o");
$SEC_status = $SEC->SpawnWaitKill ($sec->ProcessStartWaitInterval()+5);
diff --git a/TAO/orbsvcs/tests/Notify/Persistent_POA/run_test.pl b/TAO/orbsvcs/tests/Notify/Persistent_POA/run_test.pl
index 7e70755a7c7..830ff308f85 100755
--- a/TAO/orbsvcs/tests/Notify/Persistent_POA/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Persistent_POA/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
$port = $ns->RandomPort ();
$host = $ns->HostName ();
diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/run_test.pl b/TAO/orbsvcs/tests/Notify/Reconnecting/run_test.pl
index 95868051537..5a9f7e5fb8b 100755
--- a/TAO/orbsvcs/tests/Notify/Reconnecting/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Reconnecting/run_test.pl
@@ -25,7 +25,10 @@ my $nfs = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\
my $sup = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $con = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
-PerlACE::add_lib_path ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
+
# ******************************************************************
# Data Section
diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl
index 4b76027535f..7d3c72fdeb9 100755
--- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_ETCL_Filter/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -58,7 +61,7 @@ $CON = $con->CreateProcess ("Sequence_Consumer");
$client_args = "-ORBInitRef NameService=iioploc://".
"$host:$port/NameService ".
"-k file://$con_supiorfile";
-
+
$NS_status = $NS->Spawn ();
if ($NS_status != 0) {
print STDERR "ERROR: Name Service returned $NS_status\n";
diff --git a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl
index 18d4a65cecf..ba91c8458bf 100755
--- a/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Sequence_Multi_Filter/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl
index 7341038971f..0af1375fd83 100755
--- a/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl
index 000e53af6b9..4fc3ab68889 100755
--- a/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Structured_Multi_Filter/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
@@ -152,7 +155,7 @@ foreach my $supplier_op (@ops) {
$NS->Kill (); $NS->TimedWait (1);
last;
}
-
+
$sup->DeleteFile ($supiorfile);
$con->DeleteFile ($supiorfile);
}
diff --git a/TAO/orbsvcs/tests/Notify/Timeout/run_test.pl b/TAO/orbsvcs/tests/Notify/Timeout/run_test.pl
index 9466b0a46cd..0d39a917cab 100755
--- a/TAO/orbsvcs/tests/Notify/Timeout/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/Timeout/run_test.pl
@@ -22,7 +22,10 @@ my $nfs = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\
my $sup = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
my $con = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
-PerlACE::add_lib_path ('../lib');
+$ns->AddLibPath ('../lib');
+$nfs->AddLibPath ('../lib');
+$sup->AddLibPath ('../lib');
+$con->AddLibPath ('../lib');
PerlACE::check_privilege_group();
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
index 00675644772..987280e3a79 100755
--- a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
@@ -6,210 +6,171 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
-
-PerlACE::add_lib_path ('../../lib');
+use PerlACE::TestTarget;
PerlACE::check_privilege_group();
-$ior = PerlACE::LocalFile ("supplier.ior");
-$namingior = PerlACE::LocalFile ("naming.ior");
-$notifyior = PerlACE::LocalFile ("notify.ior");
-$notify_conf = PerlACE::LocalFile ("notify$PerlACE::svcconf_ext");
-$status = 0;
+my $nm_service = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $nt_service = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+my $consumer = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+my $supplier = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
+$consumer->AddLibPath ("../../lib");
+$supplier->AddLibPath ("../../lib");
+
+my $supplier_ior = "supplier.ior";
+my $naming_ior = "naming.ior";
+my $notify_ior = "notify.ior";
+my $notify_conf = "notify$PerlACE::svcconf_ext";
+
+my $ns_naming_ior = $nm_service->LocalFile ($naming_ior);
+my $ts_notify_ior = $nt_service->LocalFile ($notify_ior);
+my $ts_notify_conf = $nt_service->LocalFile ($notify_conf);
+my $supplier_supplier_ior = $supplier->LocalFile ($supplier_ior);
+my $consumer_supplier_ior = $consumer->LocalFile ($supplier_ior);
+$nm_service->DeleteFile ($naming_ior);
+$nt_service->DeleteFile ($notify_ior);
+$supplier->DeleteFile ($supplier_ior);
+$consumer->DeleteFile ($supplier_ior);
-$port = PerlACE::uniqueid () + 10001;
-$NS = new PerlACE::Process ("../../../../Naming_Service/Naming_Service",
- "-ORBEndpoint iiop://localhost:$port " .
- "-o $namingior");
-$TS = new PerlACE::Process ("../../../../Notify_Service/Notify_Service",
- "-ORBInitRef NameService=iioploc://" .
- "localhost:$port/NameService " .
- "-IORoutput $notifyior -ORBSvcConf " .
- "$notify_conf");
-$STS = new PerlACE::Process ("Structured_Supplier",
- "-ORBInitRef NameService=iioploc://" .
- "localhost:$port/NameService");
-$STC = new PerlACE::Process ("Structured_Consumer");
-
-$SES = new PerlACE::Process ("Sequence_Supplier",
- "-ORBInitRef NameService=iioploc://" .
- "localhost:$port/NameService");
-$SEC = new PerlACE::Process ("Sequence_Consumer");
-
-unlink $ior;
-unlink $notifyior;
-unlink $namingior;
-
-$client_args = "-ORBInitRef NameService=iioploc://localhost:" .
- "$port/NameService";
-
-$NS->Spawn ();
-if (PerlACE::waitforfile_timed ($namingior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the naming service to start\n";
- $NS->Kill ();
- exit 1;
-}
+$status = 0;
-$TS->Spawn ();
-if (PerlACE::waitforfile_timed ($notifyior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the notify service to start\n";
- $TS->Kill ();
- $NS->Kill ();
+my $port = $nm_service->RandomPort();
+my $host = $nm_service->HostName();
+
+my $initref = "-ORBInitRef NameService=iioploc://$host:$port/NameService ";
+
+$NS = $nm_service->CreateProcess ("../../../../Naming_Service/Naming_Service",
+ "-ORBEndpoint iiop://$host:$port -o $ns_naming_ior");
+$TS = $nt_service->CreateProcess ("../../../../Notify_Service/Notify_Service", $initref.
+ "-IORoutput $ts_notify_ior -ORBSvcConf $ts_notify_conf");
+$STS = $supplier->CreateProcess ("Structured_Supplier", $initref.
+ "-o $supplier_supplier_ior");
+$STC = $consumer->CreateProcess ("Structured_Consumer");
+$SES = $supplier->CreateProcess ("Sequence_Supplier", $initref."-o $supplier_supplier_ior");
+$SEC = $consumer->CreateProcess ("Sequence_Consumer");
+
+my $consumer_args = $initref; # ."-k $consumer_supplier_ior";
+
+sub run_test {
+ local($name, $args_suffix, $SP, $CN, $tm) = @_;
+ print $name;
+
+ $supplier->DeleteFile ($supplier_ior);
+ $consumer->DeleteFile ($supplier_ior);
+
+ my $test_status = 0;
+
+ my $result = $SP->Spawn ();
+ if ($result != 0) {
+ print STDERR "ERROR: supplier returned $result\n";
+ return 1;
+ }
+
+ if ($supplier->WaitForFileTimed ($supplier_ior, $supplier->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $SP->Kill (); $SP->TimedWait (1);
+ return 1;
+ }
+
+ if ($supplier->GetFile ($supplier_ior) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$supplier_supplier_ior>\n";
+ $SP->Kill (); $SP->TimedWait (1);
+ return 1;
+ }
+
+ if ($consumer->PutFile ($supplier_ior) == -1) {
+ print STDERR "ERROR: cannot set file <$consumer_supplier_ior>\n";
+ $SP->Kill (); $SP->TimedWait (1);
+ return 1;
+ }
+
+ $CN->Arguments ($consumer_args.$args_suffix);
+ print $tm."\n";
+ print $CN->CommandLine ()."\n";
+ $result = $CN->SpawnWaitKill ($consumer->ProcessStartWaitInterval() + $tm);
+ print "\n";
+ if ($result != 0) {
+ print STDERR "ERROR: consumer returned $result\n";
+ $test_status = 1;
+ }
+
+ $result = $SP->WaitKill ($supplier->ProcessStopWaitInterval());
+
+ if ($result != 0) {
+ print STDERR "ERROR: supplier returned $result\n";
+ $test_status = 1;
+ }
+
+ return $test_status;
+}
+
+my $result = $NS->Spawn ();
+
+if ($result != 0) {
+ print STDERR "ERROR: naming service returned $result\n";
exit 1;
}
-######################################################################
-print "**** Structured Supplier -> 2 Structured Consumers ****\n";
-$STS->Spawn ();
-if (PerlACE::waitforfile_timed ($ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the supplier to start\n";
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-$STC->Arguments($client_args);
-print $STC->CommandLine ()."\n";
-$client = $STC->SpawnWaitKill (300);
-print "\n";
-if ($client != 0) {
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
+if ($nm_service->WaitForFileTimed ($naming_ior, $nm_service->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $NS->Kill (); $NS->TimedWait (1);
exit 1;
}
-$server = $STS->WaitKill(5);
-if ($server != 0) {
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-
-######################################################################
-print "**** Structured Supplier -> Structured Consumer (filtered) ****\n";
+$result = $TS->Spawn ();
-unlink $ior;
-$STS->Spawn ();
-if (PerlACE::waitforfile_timed ($ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the supplier to start\n";
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
+if ($result != 0) {
+ print STDERR "ERROR: notify service returned $result\n";
+ $NS->Kill (); $NS->TimedWait (1);
exit 1;
}
-$STC->Arguments($client_args . " -f -c 1");
-$client = $STC->SpawnWaitKill (60);
-print "\n";
-if ($client != 0) {
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
+if ($nt_service->WaitForFileTimed ($notify_ior, $nt_service->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $TS->Kill (); $TS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
exit 1;
}
-$server = $STS->WaitKill(5);
-if ($server != 0) {
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-######################################################################
-print "**** Structured Supplier -> Sequence Consumer (filtered) ****\n";
-
-unlink $ior;
-$STS->Spawn ();
-if (PerlACE::waitforfile_timed ($ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the supplier to start\n";
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-
-$SEC->Arguments($client_args . " -f -c 1");
-$client = $SEC->SpawnWaitKill (60);
-print "\n";
-if ($client != 0) {
- $STS->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-$server = $STS->WaitKill(5);
-if ($server != 0) {
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-
-######################################################################
-print "**** Sequence Supplier -> 2 Sequence Consumers ****\n";
-
-unlink $ior;
-$SES->Spawn ();
-if (PerlACE::waitforfile_timed ($ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the supplier to start\n";
- $SES->Kill ();
- $TS->Kill ();
- $NS->Kill ();
+$result = run_test ("**** Structured Supplier -> 2 Structured Consumers ****\n",
+ "", $STS, $STC, 285);
+if ($result != 0) {
+ $TS->Kill (); $TS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
exit 1;
}
-$SEC->Arguments($client_args);
-$client = $SEC->SpawnWaitKill (60);
-print "\n";
-if ($client != 0) {
- $SES->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-$server = $SES->WaitKill(5);
-if ($server != 0) {
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
+$result = run_test ("**** Structured Supplier -> Structured Consumer (filtered) ****\n",
+ " -f -c 1", $STS, $STC, 45);
+if ($result != 0) {
+ $TS->Kill (); $TS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
}
-######################################################################
-print "**** Sequence Supplier -> Sequence Consumer (filtered) ****\n";
-
-unlink $ior;
-$SES->Spawn ();
-if (PerlACE::waitforfile_timed ($ior, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: waiting for the supplier to start\n";
- $SES->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
+$result = run_test ("**** Sequence Supplier -> 2 Sequence Consumers ****\n",
+ "", $SES, $SEC, 45);
+if ($result != 0) {
+ $TS->Kill (); $TS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
}
-$SEC->Arguments($client_args . " -f -c 1");
-$client = $SEC->SpawnWaitKill (60);
-print "\n";
-if ($client != 0) {
- $SES->Kill ();
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
-}
-$server = $SES->WaitKill(5);
-if ($server != 0) {
- $TS->Kill ();
- $NS->Kill ();
- exit 1;
+$result = run_test ("**** Sequence Supplier -> Sequence Consumer (filtered) ****\n",
+ " -f -c 1", $SES, $SEC, 45);
+if ($result != 0) {
+ $TS->Kill (); $TS->TimedWait (1);
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
}
-$TS->Kill ();
-$NS->Kill ();
-
-unlink $ior;
-unlink $notifyior;
-unlink $namingior;
+$TS->Kill (); $TS->TimedWait (1);
+$NS->Kill (); $NS->TimedWait (1);
+$nm_service->DeleteFile ($naming_ior);
+$nt_service->DeleteFile ($notify_ior);
+$supplier->DeleteFile ($supplier_ior);
+$consumer->DeleteFile ($supplier_ior);
exit $status;
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl
index 668fd0db6dd..78b8c85176e 100755
--- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl
@@ -7,7 +7,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../../lib');
PerlACE::check_privilege_group();
$status = 0;
@@ -18,6 +17,10 @@ my $nm_service = PerlACE::TestTarget::create_target (1) || die "Create target 1
my $test = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $nt_service = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+$nm_service->AddLibPath ('../../lib');
+$test->AddLibPath ('../../lib');
+$nt_service->AddLibPath ('../../lib');
+
my $notify_ior = "notify.ior";
my $naming_ior = "naming.ior";
@@ -94,7 +97,7 @@ for $config (@test_configs) {
if ($test_status != 0) {
print STDERR "ERROR: test returned $test_status\n";
- $status = 1;
+ $status = 1;
}
$NT_SV->Kill ();
diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl
index 2691c78ee49..1ef912fc5d8 100755
--- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl
+++ b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl
@@ -8,8 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Common');
-
$status = 0;
$debug_level = '0';
@@ -27,6 +25,8 @@ foreach $i (@ARGV) {
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Common');
+$client->AddLibPath ('../Common');
$client_conf = $client->LocalFile ("client$conf");
$server_conf = $server->LocalFile ("server$conf");
diff --git a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
index 3591d0c418d..ee26f123585 100755
--- a/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
+++ b/TAO/performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl
@@ -8,8 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Common');
-
$status = 0;
$debug_level = '0';
@@ -26,6 +24,8 @@ foreach $i (@ARGV) {
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Common');
+$client->AddLibPath ('../Common');
$client_conf = $client->LocalFile ("client$conf");
$server_conf = $server->LocalFile ("server$conf");
diff --git a/TAO/tests/Bug_1476_Regression/run_test.pl b/TAO/tests/Bug_1476_Regression/run_test.pl
index af7c95742a9..380681179e6 100755
--- a/TAO/tests/Bug_1476_Regression/run_test.pl
+++ b/TAO/tests/Bug_1476_Regression/run_test.pl
@@ -6,46 +6,67 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$baseior = "server.ior";
-$iorfile = PerlACE::LocalFile ($baseior);
-unlink $iorfile;
+$status = 0;
+$debug_level = '0';
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o $baseior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
}
-$CL1 = new PerlACE::Process ("client", "-k file://$iorfile");
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-$SV->Spawn ();
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
+$server_status = $SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-$CL1->Spawn (30);
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
-$client1 = $CL1->WaitKill (30);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
-$server = $SV->WaitKill (30);
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-unlink $iorfile;
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
exit $status;
diff --git a/TAO/tests/Bug_2494_Regression/run_test.pl b/TAO/tests/Bug_2494_Regression/run_test.pl
index a90e7b631c0..a10099547c1 100755
--- a/TAO/tests/Bug_2494_Regression/run_test.pl
+++ b/TAO/tests/Bug_2494_Regression/run_test.pl
@@ -11,71 +11,85 @@ use PerlACE::TestTarget;
$status = 0;
$srv_threads = '4';
$cli_threads = '30';
-$baseior = "test.ior";
-$iorfile = PerlACE::LocalFile ($baseior);
-$srvdownfile = PerlACE::LocalFile ("server_terminated");
-unlink $iorfile;
-unlink $srvdownfile;
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o $baseior -n $srv_threads");
-}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile -n $srv_threads");
-}
-$CL = new PerlACE::Process ("client", "-k file://$iorfile -n $cli_threads");
-$CLS = new PerlACE::Process ("client", "-k file://$iorfile -x");
+my $iorbase = "test.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
+
+$srvdownfile = "server_terminated";
+$server_srvdownfile = $server->LocalFile ($srvdownfile);
+
+$SV = $server->CreateProcess ("server",
+ "-o $server_iorfile " .
+ "-n $srv_threads");
+
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile -n $cli_threads");
-$server = $SV->Spawn ();
+$server_status = $SV->Spawn ();
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
$CL->Spawn ();
#Client will not terminate on its own, kill it after 30 seconds
-$CL->TimedWait (30);
-$CL->Kill (1);
-#The parameter '1' (above) indicates that an error return value should not
-#cause this test to fail.
+$CL->TimedWait ($client->ProcessStartWaitInterval() + 15);
+$CL->Kill ();
print "***Client has been killed***\n";
#Server should still be running at this point, now start the client that asks
#the server to shut itself down
-$client = $CLS->SpawnWaitKill (15);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
+$CL->Arguments ("-k file://$client_iorfile -x");
+
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
#Server should now be shutdown
-if (PerlACE::waitforfile_timed ($srvdownfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$srvdownfile>".
+if ($server->WaitForFileTimed ($srvdownfile,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_srvdownfile>".
" -- server has not shut down cleanly.\n";
- $SV->Kill ();
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-$server = $SV->WaitKill (15);
+$status_server = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($status_server != 0) {
+ print STDERR "ERROR: server returned $status_server\n";
$status = 1;
}
-unlink $iorfile;
-unlink $srvdownfile;
+$server->DeleteFile ($iorbase);
+$client->DeleteFile ($iorbase);
+$server->DeleteFile ($srvdownfile);
-exit $status
+exit $status;
diff --git a/TAO/tests/Bug_3676_Regression/run_test.pl b/TAO/tests/Bug_3676_Regression/run_test.pl
index 171b2763078..b5a1429509f 100755
--- a/TAO/tests/Bug_3676_Regression/run_test.pl
+++ b/TAO/tests/Bug_3676_Regression/run_test.pl
@@ -17,12 +17,14 @@ foreach $i (@ARGV) {
}
}
-PerlACE::add_lib_path ('IBM1047_ISO8859/.');
-PerlACE::add_lib_path ('UCS4_UTF16/.');
-
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('IBM1047_ISO8859/.');
+$client->AddLibPath ('IBM1047_ISO8859/.');
+$server->AddLibPath ('UCS4_UTF16/.');
+$client->AddLibPath ('UCS4_UTF16/.');
+
my $iorbase = "server.ior";
my $server_iorfile = $server->LocalFile ($iorbase);
my $client_iorfile = $client->LocalFile ($iorbase);
diff --git a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl b/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
index c45ad769978..2db7f459753 100755
--- a/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/Broken/run_test.pl
@@ -11,10 +11,15 @@ use PerlACE::TestTarget;
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
+$server->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+
+$client->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_B/.');
+$client->AddLibPath ('../TP_Foo_C/.');
+$client->AddLibPath ('../TP_Common/.');
my $status = 0;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
index f7e976580e5..35df7bc7318 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_1/run_test.pl
@@ -8,12 +8,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Common/.');
-
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Common/.');
+$client->AddLibPath ('../TP_Common/.');
+
my $iorbase = "server.ior";
my $server_iorfile = $server->LocalFile ($iorbase);
my $client_iorfile = $client->LocalFile ($iorbase);
@@ -33,9 +35,9 @@ if ($server_status != 0) {
exit 1;
}
-if (PerlACE::waitforfile_timed ($iorbase,
- $server->ProcessStartWaitInterval()) == -1) {
- print STDERR "ERROR: cannot find file <$iorbase>\n";
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
}
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
index f2ae993d36b..5c38153c233 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_2/run_test.pl
@@ -11,10 +11,14 @@ use PerlACE::TestTarget;
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
+$server->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$client->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$client->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+$client->AddLibPath ('../TP_Common/.');
my $status = 0;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
index 5371160718a..dce1f5b6d59 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_3/run_test.pl
@@ -11,10 +11,14 @@ use PerlACE::TestTarget;
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
+$server->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$client->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$client->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+$client->AddLibPath ('../TP_Common/.');
my $status = 0;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
index 5351b4d1dea..9046e21a748 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl
@@ -11,10 +11,15 @@ use PerlACE::TestTarget;
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
+$server->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+
+$client->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_B/.');
+$client->AddLibPath ('../TP_Foo_C/.');
+$client->AddLibPath ('../TP_Common/.');
my $status = 0;
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
index 9cae685a290..dd9692c1af0 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_Dynamic/run_test.pl
@@ -8,11 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
-
$status = 0;
$debug_level = '0';
@@ -25,6 +20,17 @@ foreach $i (@ARGV) {
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+
+$client->AddLibPath ('../TP_Foo_A/.');
+$client->AddLibPath ('../TP_Foo_B/.');
+$client->AddLibPath ('../TP_Foo_C/.');
+$client->AddLibPath ('../TP_Common/.');
+
+
my $iorbase = "server.ior";
my $server_iorfile = $server->LocalFile ($iorbase);
my $client_iorfile = $client->LocalFile ($iorbase);
diff --git a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
index 82aac5077a7..d0a8f1cbd47 100755
--- a/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
+++ b/TAO/tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl
@@ -8,11 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../TP_Foo_A/.');
-PerlACE::add_lib_path ('../TP_Foo_B/.');
-PerlACE::add_lib_path ('../TP_Foo_C/.');
-PerlACE::add_lib_path ('../TP_Common/.');
-
$status = 0;
$debug_level = '0';
@@ -24,6 +19,11 @@ foreach $i (@ARGV) {
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$server->AddLibPath ('../TP_Foo_A/.');
+$server->AddLibPath ('../TP_Foo_B/.');
+$server->AddLibPath ('../TP_Foo_C/.');
+$server->AddLibPath ('../TP_Common/.');
+
my $iorbase = "server.ior";
my $num_clients = 40;
diff --git a/TAO/tests/CodeSets/simple/run_test.pl b/TAO/tests/CodeSets/simple/run_test.pl
index 42487bd770b..753df7ccedb 100755
--- a/TAO/tests/CodeSets/simple/run_test.pl
+++ b/TAO/tests/CodeSets/simple/run_test.pl
@@ -8,13 +8,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../libs/IBM1047_ISO8859/.');
-PerlACE::add_lib_path ('../libs/UCS4_UTF16/.');
-
-
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../libs/IBM1047_ISO8859/.');
+$client->AddLibPath ('../libs/IBM1047_ISO8859/.');
+$server->AddLibPath ('../libs/UCS4_UTF16/.');
+$client->AddLibPath ('../libs/UCS4_UTF16/.');
+
my $iorbase = "server.ior";
my $server_iorfile = $server->LocalFile ($iorbase);
my $client_iorfile = $client->LocalFile ($iorbase);
diff --git a/TAO/tests/Collocation/run_test.pl b/TAO/tests/Collocation/run_test.pl
index 7061defb897..ddef8b20e7b 100755
--- a/TAO/tests/Collocation/run_test.pl
+++ b/TAO/tests/Collocation/run_test.pl
@@ -8,10 +8,10 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('.');
-
my $target = PerlACE::TestTarget::create_target(1) || die "Create target 1 failed\n";
+$target->AddLibPath ('.');
+
$status = 0;
print STDOUT "Collocation\n\n";
diff --git a/TAO/tests/Oneway_Timeouts/run_test.pl b/TAO/tests/Oneway_Timeouts/run_test.pl
index 050a2496fac..f0cda54a366 100755
--- a/TAO/tests/Oneway_Timeouts/run_test.pl
+++ b/TAO/tests/Oneway_Timeouts/run_test.pl
@@ -51,8 +51,8 @@ sub run_client_n_server
print STDERR "ERROR: server returned $ret\n";
exit 1;
}
- if (PerlACE::waitforfile_timed ($iorbase,
- $server->ProcessStartWaitInterval()) == -1) {
+ if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
print STDERR "ERROR: cannot find file <$server_iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
diff --git a/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl b/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl
index 65f736b29c5..ecaa7acd182 100755
--- a/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl
+++ b/TAO/tests/Oneways_Invoking_Twoways/run_test_svc.pl
@@ -6,40 +6,77 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
+$status = 0;
+$debug_level = '0';
-$SV = new PerlACE::Process ("server","-ORBSvcConf svcconf -o $iorfile");
-$CL1 = new PerlACE::Process ("client", "-ORBSvcConf svcconf -k file://$iorfile");
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
+
+my $server_conf = $server->LocalFile ("svcconf");
+my $client_conf = $client->LocalFile ("svcconf");
-$SV->Spawn ();
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level " .
+ "-ORBSvcConf $server_conf " .
+ "-o $server_iorfile");
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
+$CL = $client->CreateProcess ("client",
+ "-ORBSvcConf $client_conf " .
+ "-k file://$client_iorfile");
+
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-$CL1->Spawn (60);
-
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
-$client1 = $CL1->WaitKill (75);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 150);
-if ($client1 != 0) {
- print STDERR "ERROR: client 1 returned $client1\n";
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
-$server = $SV->TerminateWaitKill (5);
+$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-unlink $iorfile;
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
exit $status;
diff --git a/TAO/tests/POA/Adapter_Activator/run_test.pl b/TAO/tests/POA/Adapter_Activator/run_test.pl
index d081a1bfc80..7e98c74fde5 100755
--- a/TAO/tests/POA/Adapter_Activator/run_test.pl
+++ b/TAO/tests/POA/Adapter_Activator/run_test.pl
@@ -11,7 +11,8 @@ use PerlACE::TestTarget;
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-PerlACE::add_lib_path ('../Generic_Servant/.');
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
$iorbase = "ior";
diff --git a/TAO/tests/POA/Explicit_Activation/run_test.pl b/TAO/tests/POA/Explicit_Activation/run_test.pl
index 12ecb4fd0f5..6321e7c2f60 100755
--- a/TAO/tests/POA/Explicit_Activation/run_test.pl
+++ b/TAO/tests/POA/Explicit_Activation/run_test.pl
@@ -8,13 +8,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Generic_Servant/.');
-
$iorbase0 = "ior";
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
+
$oneway = "";
$iterations = 100;
diff --git a/TAO/tests/POA/Loader/run_test.pl b/TAO/tests/POA/Loader/run_test.pl
index 9c8edfe50df..0bc52287cac 100755
--- a/TAO/tests/POA/Loader/run_test.pl
+++ b/TAO/tests/POA/Loader/run_test.pl
@@ -8,8 +8,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Generic_Servant/.');
-
$iorbase0 = "ior";
$status = 0;
@@ -18,8 +16,11 @@ $iterations = 100;
$extra_args = "";
- $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
- $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+$client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
# Parse the arguments
for ($i = 0; $i <= $#ARGV; $i++) {
diff --git a/TAO/tests/POA/On_Demand_Activation/run_test.pl b/TAO/tests/POA/On_Demand_Activation/run_test.pl
index fa72ae887c6..2957b71a8bc 100755
--- a/TAO/tests/POA/On_Demand_Activation/run_test.pl
+++ b/TAO/tests/POA/On_Demand_Activation/run_test.pl
@@ -8,13 +8,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Generic_Servant/.');
-
$iorbase0 = "ior";
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
+
$oneway = "";
$iterations = 100;
diff --git a/TAO/tests/POA/On_Demand_Loading/run_test.pl b/TAO/tests/POA/On_Demand_Loading/run_test.pl
index 05968433781..34ad00d6daa 100755
--- a/TAO/tests/POA/On_Demand_Loading/run_test.pl
+++ b/TAO/tests/POA/On_Demand_Loading/run_test.pl
@@ -8,13 +8,14 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Generic_Servant/.');
-
$iorbase0 = "ior";
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
+
$oneway = "";
$iterations = 100;
diff --git a/TAO/tests/POA/Reference_Counted_Servant/run_test.pl b/TAO/tests/POA/Reference_Counted_Servant/run_test.pl
index bde65e316fd..c5500e776e9 100755
--- a/TAO/tests/POA/Reference_Counted_Servant/run_test.pl
+++ b/TAO/tests/POA/Reference_Counted_Servant/run_test.pl
@@ -8,13 +8,13 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::TestTarget;
-PerlACE::add_lib_path ('../Generic_Servant/.');
-
$iorbase = "poa.ior";
my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+$server->AddLibPath ('../Generic_Servant/.');
+$client->AddLibPath ('../Generic_Servant/.');
$oneway = "";
$iterations = 100;
diff --git a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl b/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
index bf13ecc9aad..b5f4c200046 100755
--- a/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
+++ b/TAO/tests/Smart_Proxies/Benchmark/run_test.pl
@@ -6,40 +6,69 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
-unlink $iorfile;
+$debug_level = '0';
+
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-$SV->Spawn ();
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-i file://$client_iorfile");
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-$client = $CL->SpawnWaitKill (60);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
-$server = $SV->WaitKill (10);
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-unlink $iorfile;
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
exit $status;
diff --git a/TAO/tests/Smart_Proxies/Benchmark/server.cpp b/TAO/tests/Smart_Proxies/Benchmark/server.cpp
index 599eeb84ef0..83c30de42f3 100644
--- a/TAO/tests/Smart_Proxies/Benchmark/server.cpp
+++ b/TAO/tests/Smart_Proxies/Benchmark/server.cpp
@@ -98,11 +98,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
try
{
- if (parse_args (argc, argv) != 0)
- return 1;
-
CORBA::ORB_var orb = CORBA::ORB_init (argc,
argv);
+ if (parse_args (argc, argv) != 0)
+ return 1;
Test_i servant (orb.in ());
// Obtain RootPOA.
diff --git a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl b/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
index b5e7daf392c..4f7c530c420 100755
--- a/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
+++ b/TAO/tests/Smart_Proxies/On_Demand/run_test.pl
@@ -6,41 +6,69 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
-$iorfile = PerlACE::LocalFile ("test.ior");
+$debug_level = '0';
-unlink $iorfile;
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+print STDERR "\nRunning Smart Proxy test consisting of the client and the server\n\n";
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", "-i file://$iorfile");
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-print STDERR "\nrunning Smart Proxy test consisting of the client and the server\n\n";
+my $iorbase = "test.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-$SV->Spawn ();
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-i file://$client_iorfile");
+$server_status = $SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
- $SV->Kill ();
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
exit 1;
}
-$client = $CL->SpawnWaitKill (60);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
$status = 1;
}
-$server = $SV->WaitKill (10);
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
$status = 1;
}
-unlink $iorfile;
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
exit $status;
diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
index 60d49a2ad86..0ab01611e34 100644
--- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp
+++ b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
@@ -95,11 +95,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
try
{
- if (parse_args (argc, argv) != 0)
- return 1;
-
CORBA::ORB_var orb = CORBA::ORB_init (argc,
argv);
+ if (parse_args (argc, argv) != 0)
+ return 1;
Test_i servant (orb.in ());
// Obtain RootPOA.