summaryrefslogtreecommitdiff
path: root/TAO/examples/Simple/time-date
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-18 13:00:45 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-18 13:00:45 +0000
commiteb7fca8b20d0b1fbd1096788568cfb858630f65d (patch)
treeafaf955e01118cd59e07cc10479ed80b8e09d084 /TAO/examples/Simple/time-date
parent7f064ce91e9c759204b504b923d021c81f3dc9c7 (diff)
downloadATCD-eb7fca8b20d0b1fbd1096788568cfb858630f65d.tar.gz
Wed Nov 18 12:58:16 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl: * orbsvcs/tests/Bug_2925_Regression/run_test.pl: * orbsvcs/tests/Security/Secure_Invocation/run_test.pl: * orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp: * orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp: * orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl: * orbsvcs/tests/Security/BiDirectional/run_test.pl: * orbsvcs/tests/Security/Big_Request/run_test.pl: * orbsvcs/tests/HTIOP/BiDirectional/run_test.pl: * orbsvcs/tests/Property/run_test.pl: * orbsvcs/tests/Bug_2316_Regression/client.cpp: * orbsvcs/tests/Bug_2316_Regression/server.cpp: * orbsvcs/tests/Bug_2316_Regression/run_test.pl: * orbsvcs/tests/Bug_2615_Regression/client.cpp: * orbsvcs/tests/Bug_2615_Regression/server.cpp: * orbsvcs/tests/Bug_2615_Regression/run_test.pl: * orbsvcs/tests/Bug_3216_Regression/run_test.pl: * orbsvcs/tests/Bug_2709_Regression/client.cpp: * orbsvcs/tests/Bug_2709_Regression/server.cpp: * orbsvcs/tests/Bug_2709_Regression/run_test.pl: * orbsvcs/tests/IOR_MCast/run_test_ipv6.pl: * orbsvcs/tests/Bug_3215_Regression/run_test.pl: * orbsvcs/tests/Bug_2287_Regression/run_test.pl: * DevGuideExamples/SmartProxies/MessengerServer.cpp: * DevGuideExamples/SmartProxies/LoggerServer.cpp: * DevGuideExamples/SmartProxies/MessengerClient.cpp: * DevGuideExamples/SmartProxies/run_test.pl: * performance-tests/Latency/DSI/run_test.pl: * performance-tests/Latency/Deferred/run_test.pl: * performance-tests/Latency/DII/run_test.pl: * performance-tests/Latency/AMI/run_test.pl: * performance-tests/Throughput/run_test.pl: * tests/AMI_Buffering/run_message_count.pl: * tests/Bug_1495_Regression/run_test_complex.pl: * tests/Bug_1495_Regression/run_test.pl: * tests/Crashed_Callback/run_test.pl: * tests/BiDirectional/run_test_bug3282.pl: * tests/Bug_1020_Basic_Regression/run_test.pl: * tests/CallbackTest/run_test_ipv6.pl: * tests/CallbackTest/run_test_mixed_ip.pl: * tests/Bug_2289_Regression/run_test.pl: * tests/DIOP/run_test_ipv6.pl: * tests/DIOP/run_test.pl: * tests/NestedUpcall/Triangle_Test/run_test.pl: * tests/MT_Timeout/run_test.pl: * tests/Single_Read/server.cpp: * tests/Single_Read/test_i.cpp: * tests/Single_Read/run_test.pl: * tests/Single_Read/test_i.h: * examples/Logging/run_test.pl: * examples/Simple/time-date/run_test.pl: * examples/PluggableUDP/tests/Performance/run_test_ipv6.pl: * examples/PluggableUDP/tests/Performance/run_test.pl: Tests are converted to use new test framework and added to fuzz build.
Diffstat (limited to 'TAO/examples/Simple/time-date')
-rwxr-xr-xTAO/examples/Simple/time-date/run_test.pl71
1 files changed, 47 insertions, 24 deletions
diff --git a/TAO/examples/Simple/time-date/run_test.pl b/TAO/examples/Simple/time-date/run_test.pl
index 092430e81ce..006fb4b759d 100755
--- a/TAO/examples/Simple/time-date/run_test.pl
+++ b/TAO/examples/Simple/time-date/run_test.pl
@@ -1,52 +1,75 @@
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;
-$iorfile = "ior";
-$conf = PerlACE::LocalFile ("client" . "$PerlACE::svcconf_ext");
+$debug_level = '0';
-# Remove the file before starting the test.
-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";
-PerlACE::add_lib_path ('.');
+my $iorbase = "ior"; # please note that conf file is defined in *.conf file
+my $client_conffile = $client->LocalFile ($PerlACE::svcconf_ext);
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client_iorfile = $client->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client->DeleteFile($iorbase);
-if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server");
+$SV = $server->CreateProcess ("server", "");
+$CL = $client->CreateProcess ("client", "-f $client_iorfile -x -ORBSvcConf $client_conffile");
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
}
-else {
- $SV = new PerlACE::Process ("server");
+
+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", "-f $iorfile -x -ORBSvcConf $conf");
-$SV->Spawn ();
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve 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: waiting for file <$iorfile>\n";
- $SV->Kill ();
+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 ($PerlACE::wait_interval_for_process_shutdown);
+$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;