summaryrefslogtreecommitdiff
path: root/TAO/tests/GIOP_Fragments
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-10 12:44:44 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-10 12:44:44 +0000
commitd10f3ad63cd21850eb7537bb954b45dd1bf920a9 (patch)
treec74ccd0d9a8d04c3c492ec48d1a889626ecad59c /TAO/tests/GIOP_Fragments
parent8279ec18ff1b867a8cec528fa281cb2e04572e56 (diff)
downloadATCD-d10f3ad63cd21850eb7537bb954b45dd1bf920a9.tar.gz
Tue Nov 10 12:36:57 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* tests/IORManipulation/filter/run_test.pl * tests/Connection_Failure/run_test.pl * orbsvcs/DevGuideExamples/NamingService/Naming_Server/run_test.pl * orbsvcs/tests/unit/Notify/MC/Statistic/run_test.pl * orbsvcs/tests/unit/Notify/MC/Statistic_Registry/run_test.pl * orbsvcs/tests/unit/Notify/MC/MonitorControlExt/run_test.pl * orbsvcs/tests/unit/Notify/MC/NotificationServiceMonitor/run_test.pl * orbsvcs/tests/unit/Notify/MC/Control/run_test.pl * orbsvcs/tests/unit/Trading/Interpreter/run_test.pl * orbsvcs/tests/Bug_2074_Regression/run_test.pl * tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl * tests/Optimized_Connection/run_test.pl * performance-tests/Latency/Collocation/run_test.pl * performance-tests/POA/Object_Creation_And_Registration/run_test.pl * orbsvcs/tests/Bug_2137_Regression/run_test.pl * orbsvcs/tests/Bug_2377_Regression/run_test.pl * orbsvcs/tests/Bug_2377_Regression/run_test_ipv6.pl Simple porting to new test framework.
Diffstat (limited to 'TAO/tests/GIOP_Fragments')
-rwxr-xr-xTAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl66
1 files changed, 38 insertions, 28 deletions
diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl
index b1ba80d3890..aac03e15218 100755
--- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl
+++ b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl
@@ -6,52 +6,62 @@ 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 ('server.ior');
+$debug_level = '0';
$TARGETHOSTNAME = '127.0.0.1';
$port = PerlACE::uniqueid () + 12000;
-$debug = 0;
$endien = (pack('L', 0x41424344) eq 'ABCD' ? '_be' : '');
-unlink $iorfile;
-
-if (PerlACE::is_vxworks_test()) {
- $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'};
- $SV = new PerlACE::ProcessVX ('server',
- '-ORBEndpoint ' .
- "iiop://$TARGETHOSTNAME" . ":$port " .
- "-ORBDebugLevel $debug");
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
}
-else {
- $SV = new PerlACE::Process ('server',
- '-ORBEndpoint ' .
- "iiop://$TARGETHOSTNAME" . ":$port " .
- "-ORBDebugLevel $debug");
+
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+
+$SV = $server->CreateProcess ( "server",
+ "-ORBEndpoint " .
+ "iiop://$TARGETHOSTNAME" . ":$port " .
+ "-ORBDebugLevel $debug_level");
+
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $server->DeleteFile($iorbase);
+ exit 1;
}
-$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
- print STDERR "ERROR: cannot find file <$iorfile>\n";
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
+ $server->DeleteFile($iorbase);
exit 1;
}
-my($cl) = system("$^X dribble.pl --host=$TARGETHOSTNAME --port=$port " .
+my($CL) = system("$^X dribble.pl --host=$TARGETHOSTNAME --port=$port " .
"--stream=giop1.2_fragments$endien.dat " .
"--layout=giop1.2_fragments$endien.layout");
-if ($cl != 0) {
- print STDERR "ERROR: client returned $cl\n";
- ++$status;
+if ($CL != 0) {
+ print STDERR "ERROR: client returned $CL\n";
+ $status = 2;
}
-$server = $SV->WaitKill (15);
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
-if ($server != 0) {
- print STDERR "ERROR: server returned $server\n";
- ++$status;
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $status = 3;
}
-unlink $iorfile;
+$server->DeleteFile($iorbase);
+
exit $status;