summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2007-08-25 13:27:19 +0000
committerSteve Huston <shuston@riverace.com>2007-08-25 13:27:19 +0000
commit51769dc0f190622c5cd5d4489e9c1cadb55d8864 (patch)
treef64a8a8a6e29889070ba07b35804171e8391d5b5
parent538334f03e77a195cd9437030df4095e4df6d4b4 (diff)
downloadATCD-51769dc0f190622c5cd5d4489e9c1cadb55d8864.tar.gz
ChangeLogTag:Sat Aug 25 12:37:53 UTC 2007 Steve Huston <shuston@riverace.com>
-rw-r--r--TAO/ChangeLog13
-rwxr-xr-xTAO/tests/AMH_Exceptions/run_test.pl23
-rwxr-xr-xTAO/tests/CDR/run_test.pl7
-rwxr-xr-xTAO/tests/CallbackTest/run_test.pl16
-rwxr-xr-xTAO/tests/Client_Leaks/run_test.pl16
-rwxr-xr-xTAO/tests/Codec/run_test.pl7
-rwxr-xr-xTAO/tests/Collocation/run_test.pl8
-rwxr-xr-xTAO/tests/Hello/run_test.pl18
-rwxr-xr-xTAO/tests/Param_Test/run_test.pl12
9 files changed, 85 insertions, 35 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4c8a80179a3..a27b03cbb5a 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Sat Aug 25 12:37:53 UTC 2007 Steve Huston <shuston@riverace.com>
+
+ * tests/AHM_Exceptions/run_test.pl:
+ * tests/CDR/run_test.pl:
+ * tests/CallbackTest/run_test.pl:
+ * tests/Client_Leaks/run_test.pl:
+ * tests/Codec/run_test.pl:
+ * tests/Collocation/run_test.pl:
+ * tests/Hello/run_test.pl:
+ * tests/Param_Test/run_test.pl: Converted to use the new target
+ test mechanism. See ACE ChangeLog
+ Sat Aug 25 12:57:30 UTC 2007 Steve Huston <shuston@riverace.com>
+
Fri Aug 24 15:18:56 UTC 2007 Phil Mesnier <mesnier_p@ociweb.com>
* tao/TAO_Internal.cpp:
diff --git a/TAO/tests/AMH_Exceptions/run_test.pl b/TAO/tests/AMH_Exceptions/run_test.pl
index 7bd307293bf..b76623d1ea7 100755
--- a/TAO/tests/AMH_Exceptions/run_test.pl
+++ b/TAO/tests/AMH_Exceptions/run_test.pl
@@ -9,28 +9,35 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
# Amount of delay (in seconds) between starting a server and a client.
$sleeptime = $PerlACE::wait_interval_for_process_creation;
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
+
# File used to pass AMH server ior to its clients.
# This file name is hard-coded in the server.cpp and client.cpp files
-$iorfile = PerlACE::LocalFile("test.ior");
-
-unlink $iorfile;
+$iorfile = $target->LocalFile("test.ior");
+$target->DeleteFile($iorfile);
+#unlink $iorfile;
if (PerlACE::is_vxworks_test()) {
$AMH = new PerlACE::ProcessVX ("server", "");
}
else {
- $AMH = new PerlACE::Process ("server", "");
+ $AMH = $target->CreateProcess ("server", "");
+# $AMH = new PerlACE::Process ("server", "");
}
-$CL = new PerlACE::Process ("client", "");
+
+$CL = $target->CreateProcess ("client", "");
+#$CL = new PerlACE::Process ("client", "");
# Run the AMH server.
$AMH->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
+#if (PerlACE::waitforfile_timed ($iorfile, $sleeptime) == -1) {
+if ($target->WaitForFileTimed ($iorfile, $sleeptime) == -1) {
print STDERR "ERROR: File containing AMH Server ior,".
" <$iorfile>, cannot be found\n";
$AMH->Kill ();
@@ -49,6 +56,6 @@ if ($amhserver != 0) {
$status = 1;
}
-unlink $iorfile;
-
+#unlink $iorfile;
+$target->DeleteFile ($iorfile);
exit $status;
diff --git a/TAO/tests/CDR/run_test.pl b/TAO/tests/CDR/run_test.pl
index 109f37ec31b..5ca6abb034c 100755
--- a/TAO/tests/CDR/run_test.pl
+++ b/TAO/tests/CDR/run_test.pl
@@ -7,6 +7,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
+
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
$brace="\#\#\#\#\#";
%tests = ("basic_types" => "-n 256 -l 10",
@@ -21,7 +24,7 @@ print STDERR "\n";
while (($test,$args) = each %tests) {
print STDERR "\n$brace $test $args test BEGUN\n";
- $TST = new PerlACE::Process ($test, $args);
+ $TST = $target->CreateProcess ($test, $args);
print STDERR "\tRUNNING $test\n";
$retval = $TST->SpawnWaitKill (90);
@@ -33,4 +36,6 @@ while (($test,$args) = each %tests) {
print STDERR "$brace $test FINISHED successfully\n";
}
+$target->GetStderrLog();
+
exit $status;
diff --git a/TAO/tests/CallbackTest/run_test.pl b/TAO/tests/CallbackTest/run_test.pl
index ee078f19b35..7535dc10c17 100755
--- a/TAO/tests/CallbackTest/run_test.pl
+++ b/TAO/tests/CallbackTest/run_test.pl
@@ -7,22 +7,25 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
+
+$iorfile = $target->LocalFile ("server.ior");
+$target->DeleteFile ($iorfile);
$status = 0;
if (PerlACE::is_vxworks_test()) {
$SV = new PerlACE::ProcessVX ("server", "-o server.ior");
}
else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
+ $SV = $target->CreateProcess ("server", "-ORBid Callback_server -o $iorfile");
}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBDottedDecimalAddresses 1");
+$CL = $target->CreateProcess ("client", " -k file://$iorfile -ORBDottedDecimalAddresses 1");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile,
+if ($target->WaitForFileTimed ($iorfile,
$PerlACE::wait_interval_for_process_creation) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
@@ -45,6 +48,7 @@ if ($server != 0) {
$status = 1;
}
-unlink $iorfile;
+$target->GetStderrLog();
+$target->DeleteFile ($iorfile);
exit $status;
diff --git a/TAO/tests/Client_Leaks/run_test.pl b/TAO/tests/Client_Leaks/run_test.pl
index cb8ea3bf51e..56e2335bc07 100755
--- a/TAO/tests/Client_Leaks/run_test.pl
+++ b/TAO/tests/Client_Leaks/run_test.pl
@@ -7,17 +7,20 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $iorfile;
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
+
+$iorfile = $target->LocalFile ("server.ior");
+$target->DeleteFile ($iorfile);
$status = 0;
-$SV = new PerlACE::Process ("server", "-o $iorfile");
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
+$SV = $target->CreateProcess ("server", "-ORBid Client_Leaks_server -o $iorfile");
+$CL = $target->CreateProcess ("client", " -k file://$iorfile");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+if ($target->WaitForFileTimed($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
@@ -37,6 +40,7 @@ if ($server != 0) {
$status = 1;
}
-unlink $iorfile;
+$target->GetStderrLog();
+$target->DeleteFile ($iorfile);
exit $status;
diff --git a/TAO/tests/Codec/run_test.pl b/TAO/tests/Codec/run_test.pl
index 35f1fec05f4..c7848195ee8 100755
--- a/TAO/tests/Codec/run_test.pl
+++ b/TAO/tests/Codec/run_test.pl
@@ -7,6 +7,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
+
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
print STDERR "\n\n==== Running Codec test\n";
@@ -14,11 +17,13 @@ if (PerlACE::is_vxworks_test()) {
$T = new PerlACE::ProcessVX ("client");
}
else {
- $T = new PerlACE::Process ("client");
+ $T = $target->CreateProcess ("client");
}
$test = $T->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
+$target->GetStderrLog();
+
if ($test != 0) {
print STDERR "ERROR: Codec test returned $test\n";
exit 1;
diff --git a/TAO/tests/Collocation/run_test.pl b/TAO/tests/Collocation/run_test.pl
index b8563f357da..098e1b266cc 100755
--- a/TAO/tests/Collocation/run_test.pl
+++ b/TAO/tests/Collocation/run_test.pl
@@ -7,6 +7,9 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
+
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
$status = 0;
@@ -16,10 +19,9 @@ if (PerlACE::is_vxworks_test()) {
$SV = new PerlACE::ProcessVX ("Collocation");
}
else {
- $SV = new PerlACE::Process ("Collocation");
+ $SV = $target->CreateProcess ("Collocation");
}
-
$server = $SV->SpawnWaitKill ($PerlACE::wait_interval_for_process_creation);
if ($server != 0) {
@@ -27,4 +29,6 @@ if ($server != 0) {
$status = 1;
}
+$target->GetStderrLog();
+
exit $status;
diff --git a/TAO/tests/Hello/run_test.pl b/TAO/tests/Hello/run_test.pl
index b2c4c956f2f..c7759f34735 100755
--- a/TAO/tests/Hello/run_test.pl
+++ b/TAO/tests/Hello/run_test.pl
@@ -7,6 +7,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
$status = 0;
$debug_level = '0';
@@ -17,17 +18,19 @@ foreach $i (@ARGV) {
}
}
+my $target = PerlACE::TestTarget::create_target ($PerlACE::TestConfig);
+
$iorbase = "server.ior";
-$iorfile = PerlACE::LocalFile ("$iorbase");
-unlink $iorfile;
+$iorfile = $target->LocalFile ("$iorbase");
+$target->DeleteFile($iorfile);
if (PerlACE::is_vxworks_test()) {
$SV = new PerlACE::ProcessVX ("server", "-ORBDebuglevel $debug_level -o $iorbase");
}
else {
- $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -o $iorfile");
+ $SV = $target->CreateProcess ("server", "-ORBdebuglevel $debug_level -ORBid hello_server -o $iorfile");
}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
+$CL = $target->CreateProcess ("client", " -ORBid hello_client -k file://$iorfile");
$server = $SV->Spawn ();
@@ -36,7 +39,7 @@ if ($server != 0) {
exit 1;
}
-if (PerlACE::waitforfile_timed ($iorfile,
+if ($target->WaitForFileTimed ($iorfile,
$PerlACE::wait_interval_for_process_creation) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
@@ -57,6 +60,9 @@ if ($server != 0) {
$status = 1;
}
-unlink $iorfile;
+$target->GetStderrLog();
+
+#unlink $iorfile;
+$target->DeleteFile($iorfile);
exit $status;
diff --git a/TAO/tests/Param_Test/run_test.pl b/TAO/tests/Param_Test/run_test.pl
index 93dca972349..977ae28447c 100755
--- a/TAO/tests/Param_Test/run_test.pl
+++ b/TAO/tests/Param_Test/run_test.pl
@@ -7,15 +7,17 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
use lib "$ENV{ACE_ROOT}/bin";
use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$iorfile = PerlACE::LocalFile ("server.ior");
+$target = PerlACE::TestTarget::create_target() || die "Create target failed\n";
+$iorfile = $target->LocalFile ("server.ior");
$invocation = "sii";
$num = 5;
$debug = "";
$status = 0;
-unlink $iorfile;
+$target->DeleteFile($iorfile);
# Parse the arguments
@@ -67,12 +69,12 @@ if (PerlACE::is_vxworks_test()) {
$SV = new PerlACE::ProcessVX ("server", "$debug -o server.ior");
}
else {
- $SV = new PerlACE::Process ("server", "$debug -o $iorfile");
+ $SV = $target->CreateProcess ("server", "$debug -o $iorfile");
}
-$CL = new PerlACE::Process ("client");
+$CL = $target->CreateProcess ("client");
foreach $type (@types) {
- unlink $iorfile; # Ignore errors
+ $target->DeleteFile($iorfile); # Ignore errors
print STDERR "==== Testing $type === wait....\n";