summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog8
-rwxr-xr-xTAO/tests/Bug_2595_Regression/run_test.pl69
-rwxr-xr-xTAO/tests/Bug_2654_Regression/run_test.pl65
-rwxr-xr-xTAO/tests/Bug_2669_Regression/run_test.pl29
-rwxr-xr-xTAO/tests/Bug_2677_Regression/run_test.pl27
5 files changed, 118 insertions, 80 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 1e9316240b7..9006c55e8e8 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,11 @@
+Thu Nov 13 14:56:30 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Bug_2595_Regression/run_test.pl:
+ * tests/Bug_2654_Regression/run_test.pl:
+ * tests/Bug_2669_Regression/run_test.pl:
+ * tests/Bug_2677_Regression/run_test.pl:
+ Converted to the new test framework
+
Thu Nov 13 14:45:30 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Bug_1636_Regression/run_test.pl:
diff --git a/TAO/tests/Bug_2595_Regression/run_test.pl b/TAO/tests/Bug_2595_Regression/run_test.pl
index fee5bc7bc29..08ce72b2631 100755
--- a/TAO/tests/Bug_2595_Regression/run_test.pl
+++ b/TAO/tests/Bug_2595_Regression/run_test.pl
@@ -6,44 +6,71 @@ 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';
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $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);
+
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
+$server_status = $SV->Spawn ();
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o server.ior");
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
}
-else {
- $SV = new PerlACE::Process ("server", "-o $iorfile");
+
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile,
- $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
+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 (300);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
-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->GetStderrLog();
+$client->GetStderrLog();
+
+$server->DeleteFile($server_iorfile);
+$client->DeleteFile($client_iorfile);
exit $status;
diff --git a/TAO/tests/Bug_2654_Regression/run_test.pl b/TAO/tests/Bug_2654_Regression/run_test.pl
index d74589928ba..08ce72b2631 100755
--- a/TAO/tests/Bug_2654_Regression/run_test.pl
+++ b/TAO/tests/Bug_2654_Regression/run_test.pl
@@ -6,7 +6,7 @@ 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';
@@ -14,48 +14,63 @@ $debug_level = '0';
foreach $i (@ARGV) {
if ($i eq '-debug') {
$debug_level = '10';
- }
+ }
}
-$iorfile = PerlACE::LocalFile ("server.ior");
-unlink $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";
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-ORBDebuglevel $debug_level -o server.ior");
-}
-else {
- $SV = new PerlACE::Process ("server", "-ORBdebuglevel $debug_level -o $iorfile");
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
+
+$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
+$CL = $client->CreateProcess ("client", "-k file://$client_iorfile");
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
}
-$CL = new PerlACE::Process ("client", " -k file://$iorfile");
-
-$server = $SV->Spawn ();
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
+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";
+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 (300);
+$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
-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 (15);
+$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->GetStderrLog();
+$client->GetStderrLog();
+
+$server->DeleteFile($server_iorfile);
+$client->DeleteFile($client_iorfile);
exit $status;
diff --git a/TAO/tests/Bug_2669_Regression/run_test.pl b/TAO/tests/Bug_2669_Regression/run_test.pl
index fdb7759230c..2e0c5610736 100755
--- a/TAO/tests/Bug_2669_Regression/run_test.pl
+++ b/TAO/tests/Bug_2669_Regression/run_test.pl
@@ -1,31 +1,22 @@
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
# $Id$
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-$status = 0;
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
-if (PerlACE::is_vxworks_test()) {
- $CL = new PerlACE::ProcessVX ("client", "");
-}
-else {
- $CL = new PerlACE::Process ("client", "");
-}
+$SV = $server->CreateProcess ("client");
-$client = $CL->SpawnWaitKill (300);
+$test = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
-if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
-}
-else
-{
- print "Test Passed.\n"
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
-exit $status;
+exit 0;
diff --git a/TAO/tests/Bug_2677_Regression/run_test.pl b/TAO/tests/Bug_2677_Regression/run_test.pl
index 2e9a4eb92bc..d1d85802727 100755
--- a/TAO/tests/Bug_2677_Regression/run_test.pl
+++ b/TAO/tests/Bug_2677_Regression/run_test.pl
@@ -1,25 +1,22 @@
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
- & eval 'exec perl -S $0 $argv:q'
- if 0;
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
# $Id$
# -*- perl -*-
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::Run_Test;
+use PerlACE::TestTarget;
-## Avoid code duplication by determining the process type and
-## storing it as a string for use later.
-my $class = (PerlACE::is_vxworks_test() ? 'PerlACE::ProcessVX' :
- 'PerlACE::Process');
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
-## First test that the -ORBSvcConfDirective works with good options.
-my $SV = $class->new('server');
-$SV->Spawn ();
-my $server = $SV->WaitKill(20);
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- exit(1);
+$SV = $server->CreateProcess ("server");
+
+$test = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
+
+if ($test != 0) {
+ print STDERR "ERROR: test returned $test\n";
+ exit 1;
}
-exit(0);
+exit 0;