summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl')
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Latency/run_test.pl66
1 files changed, 66 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
new file mode 100755
index 00000000000..e68dc081e27
--- /dev/null
+++ b/TAO/orbsvcs/tests/AVStreams/Latency/run_test.pl
@@ -0,0 +1,66 @@
+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;
+
+# amount of delay between running the servers
+
+$status = 0;
+
+$pingior = PerlACE::LocalFile ("ping.ior");
+$pongior = PerlACE::LocalFile ("pong.ior");
+
+unlink $pingior, $pongior;
+
+$PING = new PerlACE::Process ("ping", "-o $pingior");
+$PONG = new PerlACE::Process ("pong", "-o $pongior");
+$CTRL = new PerlACE::Process ("control", "-f file://$pingior -g file://$pongior");
+
+print STDERR "Starting Ping\n";
+
+$PING_result = $PING->Spawn ();
+
+if ($PING_result != 0) {
+ print STDERR "ERROR: Ping returned $PING_result\n";
+ exit 1;
+}
+
+if (PerlACE::waitforfile_timed ($pingior, 20) == -1) {
+ print STDERR "ERROR: cannot find file <$pingior>\n";
+ $PING->Kill ();
+ exit 1;
+}
+
+print STDERR "Starting Pong\n";
+
+$PONG->Spawn ();
+if (PerlACE::waitforfile_timed ($pongior, 20) == -1) {
+ print STDERR "ERROR: cannot find file <$pongior>\n";
+ $PING->Kill ();
+ $PONG->Kill ();
+ exit 1;
+}
+
+print STDERR "Starting Control\n";
+
+$CTRL->Spawn();
+
+$PING->WaitKill(100);
+
+$PONG->WaitKill(100);
+
+$control = $CTRL->TerminateWaitKill (5);
+
+if ($control != 0) {
+ print STDERR "ERROR: control returned $control\n";
+ $status = 1;
+}
+
+unlink $pingior, $pongior;
+
+exit $status;