diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl | |
parent | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff) | |
download | ATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl new file mode 100755 index 00000000000..a44a114b388 --- /dev/null +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/run_test.pl @@ -0,0 +1,74 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib '../../../../bin'; +use PerlACE::Run_Test; + +$port = PerlACE::uniqueid () + 10001; # This can't be 10000 on Chorus 4.0 + +$NS_ior = PerlACE::LocalFile ("NameService.ior"); +$sleeptime = 8; +$status = 0; + +$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", + "-ORBNameServicePort $port -o $NS_ior"); +$ES = new PerlACE::Process ("../../Event_Service/Event_Service", + "-ORBInitRef NameService=file://$NS_ior"); +$C = new PerlACE::Process ("ECM_Consumer", + "-ORBInitRef NameService=file://$NS_ior"); +$S = new PerlACE::Process ("ECM_Supplier", + "-ORBInitRef NameService=file://$NS_ior"); + +$NS->Spawn (); + +if (PerlACE::waitforfile_timed ($NS_ior, 10) == -1) { + print STDERR "ERROR: waiting for naming service IOR file\n"; + $NS->Kill (); + exit 1; +} + +$ES->Spawn (); + +sleep $sleeptime; + +$C->Spawn (); + +sleep $sleeptime; + +$S->Spawn (); + +$consumer = $C->WaitKill (60); + +if ($consumer != 0) { + print STDERR "ERROR: consumer returned $consumer\n"; + $status = 1; +} + +$supplier = $S->WaitKill (60); + +if ($supplier == -1) { + print STDERR "ERROR: supplier returned $supplier\n"; + $status = 1; +} + +$nserver = $NS->TerminateWaitKill (5); + +if ($nserver != 0) { + print STDERR "ERROR: nameserver returned $nserver\n"; + $status = 1; +} + +$eserver = $ES->TerminateWaitKill (5); + +if ($eserver != 0) { + print STDERR "ERROR: eventserver returned $eserver\n"; + $status = 1; +} + +unlink $NS_ior; + +exit $status; |