diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-17 13:06:44 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-17 13:06:44 +0000 |
commit | 95d50c36d1a1f6600cf9a9e5bd8cc6dec8b4059a (patch) | |
tree | e2ae8cc831ca52b4f27cc575dfefbc4ba8fdbed6 /TAO/interop-tests | |
parent | 486712be8bd7adf6d2794b4e18c0239ec402a93b (diff) | |
download | ATCD-95d50c36d1a1f6600cf9a9e5bd8cc6dec8b4059a.tar.gz |
Thu Dec 17 13:03:32 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* interop-tests/wchar/run_test.pl:
Test is converted to use new test framework
and added to fuzz build.
Diffstat (limited to 'TAO/interop-tests')
-rwxr-xr-x | TAO/interop-tests/wchar/run_test.pl | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/TAO/interop-tests/wchar/run_test.pl b/TAO/interop-tests/wchar/run_test.pl index c34e1d5a2dc..2727e682359 100755 --- a/TAO/interop-tests/wchar/run_test.pl +++ b/TAO/interop-tests/wchar/run_test.pl @@ -6,37 +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; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -$SV = new PerlACE::Process ("server", "-o $iorfile"); -$CL = new PerlACE::Process ("client", "-k file://$iorfile -x"); +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->Spawn (); +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile -x"); +$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"; +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() + 285); -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; |