diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-DS-main.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl')
-rwxr-xr-x | modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl b/modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl new file mode 100755 index 00000000000..c1811abee9d --- /dev/null +++ b/modules/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl @@ -0,0 +1,47 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$status = 0; +$iorfile = PerlACE::LocalFile ("test.ior"); + +for ($iter = 0; $iter <= $#ARGV; $iter++) { + if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { + print "Run_Test Perl script for NodeApplicationTest \n\n"; + print "run_test \n"; + print "\n"; + print "-h -- prints this information\n"; + exit 0; + } +} + + +unlink $iorfile; +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV = new PerlACE::Process ("../../NodeApplication/NodeApplication", + "-n -o $iorfile"); + +$CL = new PerlACE::Process ("client_simple", + "-k file://$iorfile "); + +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); + exit 1; +} + +$CL->SpawnWaitKill (10); +$status = $SV->Kill (); $SV->TimedWait (1); + +unlink $iorfile; + +exit $status; |