diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-05 03:23:49 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-05 03:23:49 +0000 |
commit | 417d64578f2d7cb67ebc0b9df4f6461ca42cae17 (patch) | |
tree | 8bb327569be3f54d7ca99ad830c1c991170ea28d /TAO/tests/Xt_Stopwatch | |
parent | 6ff49d9e17499c0aae245864353f31a2b1186c9f (diff) | |
download | ATCD-417d64578f2d7cb67ebc0b9df4f6461ca42cae17.tar.gz |
ChangeLogTag:Sun Mar 4 19:12:59 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/tests/Xt_Stopwatch')
-rwxr-xr-x | TAO/tests/Xt_Stopwatch/run_test.pl | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/TAO/tests/Xt_Stopwatch/run_test.pl b/TAO/tests/Xt_Stopwatch/run_test.pl index 57d8fdfbfc4..546d8c8b716 100755 --- a/TAO/tests/Xt_Stopwatch/run_test.pl +++ b/TAO/tests/Xt_Stopwatch/run_test.pl @@ -5,43 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # $Id$ # -*- perl -*- -unshift @INC, '../../../bin'; -require Process; -require ACEutils; +use lib '../../../bin'; +use PerlACE::Run_Test; -print STDERR "\n\n==== XtReactor demo test\n"; - -$file="test.ior"; +$status = 0; +$file = PerlACE::LocalFile ("test.ior"); unlink $file; -$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT, - "-o $file"); -if (ACE::waitforfile_timed ($file, 3) == -1) { - print STDERR "ERROR: cannot find file <$file>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} +$SV = new PerlACE::Process ("server", "-o $file"); +$CL = new PerlACE::Process ("client", "file://$file"); -$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT, - "file://$file"); +print STDERR "\n\n==== XtReactor demo test\n"; -$client = $CL->TimedWait (60); -if ($client == -1) { - print STDERR "ERROR: client timedout\n"; - $CL->Kill (); $CL->TimedWait (1); +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($file, 3) == -1) { + print STDERR "ERROR: cannot find file <$file>\n"; + $SV->Kill (); + exit 1; } -$server = $SV->TimedWait (5); -if ($server == -1) { - print STDERR "ERROR: server timedout\n"; - $SV->Kill (); $SV->TimedWait (1); +$client = $CL->SpawnWaitKill (60); + +if ($client != 0) { + print STDERR "ERROR: client returned $client\n"; + $status = 1; } -if ($client == -1 || $server == -1) { - exit 1; +$server = $SV->WaitKill (5); + +if ($server != 0) { + print STDERR "ERROR: server returned $server\n"; + $status = 1; } unlink $file; -exit 0; +exit $status; |