summaryrefslogtreecommitdiff
path: root/trunk/TAO/performance-tests/Protocols/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/performance-tests/Protocols/run_test.pl')
-rwxr-xr-xtrunk/TAO/performance-tests/Protocols/run_test.pl43
1 files changed, 43 insertions, 0 deletions
diff --git a/trunk/TAO/performance-tests/Protocols/run_test.pl b/trunk/TAO/performance-tests/Protocols/run_test.pl
new file mode 100755
index 00000000000..579d3e7725e
--- /dev/null
+++ b/trunk/TAO/performance-tests/Protocols/run_test.pl
@@ -0,0 +1,43 @@
+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;
+
+$ORBdebuglevel = 0;
+$status = 0;
+
+$iorfile = "receiver.ior";
+unlink $iorfile;
+
+$SV = new PerlACE::Process ("receiver", "-ORBdebuglevel $ORBdebuglevel");
+$CL = new PerlACE::Process ("sender", "-ORBdebuglevel $ORBdebuglevel -a 0 -b 0 -c 0 -d 0 -e 0 -i 10 -k file://receiver.ior -m 0 -p IIOP -r 5 -s 100 -t 0 -x 1");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill ();
+ exit 1;
+}
+
+$sender = $CL->SpawnWaitKill (60);
+$receiver = $SV->WaitKill (5);
+
+unlink $iorfile;
+
+if ($sender != 0) {
+ print STDERR "ERROR: sender returned $sender\n";
+ $status = 1;
+}
+
+if ($receiver != 0) {
+ print STDERR "ERROR: receiver returned $receiver\n";
+ $status = 1;
+}
+
+exit $status;