summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/CosEC/Simple/run_test.pl
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 23:12:28 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-25 23:12:28 +0000
commit41e5f7090068b47c9b3b3864cb53c61a4e81139f (patch)
treebe8564d813bc48fa459740c1f3d93ed29d0cd3c2 /TAO/orbsvcs/examples/CosEC/Simple/run_test.pl
parentc00a675f7a0c64c9b6e6f0518b147dd9deba2967 (diff)
downloadATCD-41e5f7090068b47c9b3b3864cb53c61a4e81139f.tar.gz
ChangeLogTag:Fri Feb 25 15:08:18 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/Simple/run_test.pl')
-rwxr-xr-xTAO/orbsvcs/examples/CosEC/Simple/run_test.pl56
1 files changed, 56 insertions, 0 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/Simple/run_test.pl b/TAO/orbsvcs/examples/CosEC/Simple/run_test.pl
new file mode 100755
index 00000000000..fd480895d18
--- /dev/null
+++ b/TAO/orbsvcs/examples/CosEC/Simple/run_test.pl
@@ -0,0 +1,56 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+unshift @INC, '../../../../../bin';
+require Process;
+require ACEutils;
+
+$iorfile = "ec.ior";
+
+unlink $iorfile;
+
+$T = Process::Create ($EXEPREFIX."Service".$EXE_EXT,
+ "-o $iorfile");
+
+if (ACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$C = Process::Create ($EXEPREFIX."Consumer".$EXE_EXT,
+ " file://$iorfile");
+
+sleep 5;
+
+$S = Process::Create ($EXEPREFIX."Supplier".$EXE_EXT,
+ " file://$iorfile");
+
+if ($S->TimedWait (120) == -1) {
+ print STDERR "ERROR: supplier timedout\n";
+ $S->Kill (); $S->TimedWait (1);
+ $C->Kill (); $C->TimedWait (1);
+ $T->Kill (); $T->TimedWait (1);
+ exit 1;
+}
+
+if ($C->TimedWait (15) == -1) {
+ print STDERR "ERROR: consumer timedout\n";
+ $C->Kill (); $C->TimedWait (1);
+ $T->Kill (); $T->TimedWait (1);
+ exit 1;
+}
+
+$T->Terminate (); if ($T->TimedWait (5) == -1) {
+ print STDERR "ERROR: cannot terminate service\n";
+ $T->Kill (); $T->TimedWait (1);
+ exit 1;
+}
+
+unlink $iorfile;
+
+exit 0;