summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-17 19:40:49 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-17 19:40:49 +0000
commit5c74ae12acd7577a230de0e6f7b756eac4208d71 (patch)
treee0dcd7f56c71bd720d1c06a4273f0af4d86acd04 /TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
parenta2b74930127a7736131ff6daedc7d23e7e0f312d (diff)
downloadATCD-5c74ae12acd7577a230de0e6f7b756eac4208d71.tar.gz
ChangeLogTag: Thu Jan 17 13:40:09 2002 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl')
-rwxr-xr-xTAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl165
1 files changed, 165 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
new file mode 100755
index 00000000000..74b492a1795
--- /dev/null
+++ b/TAO/orbsvcs/tests/Notify/performance-tests/Filter/run_test.pl
@@ -0,0 +1,165 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../../bin";
+use PerlACE::Run_Test;
+
+$ior = PerlACE::LocalFile ("supplier.ior");
+$notifyior = PerlACE::LocalFile ("notify.ior");
+$notify_conf = PerlACE::LocalFile ("notify.conf");
+$status = 0;
+
+unlink $notifyior;
+
+$port = PerlACE::uniqueid () + 10001;
+$NS = new PerlACE::Process ("../../../../Naming_Service/Naming_Service",
+ "-ORBEndpoint iiop://localhost:$port");
+$TS = new PerlACE::Process ("../../../../Notify_Service/Notify_Service",
+ "-ORBInitRef NameService=iioploc://" .
+ "localhost:$port/NameService " .
+ "-IORoutput $notifyior -ORBSvcConf " .
+ "$notify_conf");
+$STS = new PerlACE::Process ("Structured_Supplier",
+ "-ORBInitRef NameService=iioploc://" .
+ "localhost:$port/NameService");
+$STC = new PerlACE::Process ("Structured_Consumer");
+
+$SES = new PerlACE::Process ("Sequence_Supplier",
+ "-ORBInitRef NameService=iioploc://" .
+ "localhost:$port/NameService");
+$SEC = new PerlACE::Process ("Sequence_Consumer");
+
+$client_args = "-ORBInitRef NameService=iioploc://localhost:" .
+ "$port/NameService";
+$NS->Spawn ();
+$TS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($notifyior, 20) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $TS->Kill ();
+ $NS->Kill ();
+ exit 1;
+}
+
+print "********* Running Structured Consumer with two " .
+ "consumers and no filter *******\n";
+
+unlink $ior;
+$STS->Spawn ();
+
+if (PerlACE::waitforfile_timed ($ior, 20) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $STS->Kill ();
+ $TS->Kill ();
+ $NS->Kill ();
+ $status = 1;
+}
+
+if ($status == 0) {
+ $STC->Arguments($client_args);
+ $client = $STC->SpawnWaitKill (60);
+ print "\n";
+
+ $STS->Kill ();
+ if ($client != 0) {
+ print STDERR "ERROR: Structured_Consumer did not run properly\n";
+ $status = 1;
+ }
+
+ if ($status == 0) {
+ print "********* Running Structured Consumer with one " .
+ "consumer and one filter *******\n";
+
+ unlink $ior;
+ $STS->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($ior, 20) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $STS->Kill ();
+ $TS->Kill ();
+ $NS->Kill ();
+ $status = 1;
+ }
+
+ if ($status == 0) {
+ $STC->Arguments($client_args . " -f -c 1");
+ $client = $STC->SpawnWaitKill (60);
+ print "\n";
+
+ $STS->Kill ();
+ if ($client != 0) {
+ print STDERR "ERROR: Structured_Consumer did not run properly\n";
+ $status = 1;
+ }
+ }
+ }
+}
+
+if ($status == 0) {
+ print "********* Running Sequence Consumer with two " .
+ "consumers and no filter *******\n";
+
+ unlink $ior;
+ $SES->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($ior, 20) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $SES->Kill ();
+ $TS->Kill ();
+ $NS->Kill ();
+ $status = 1;
+ }
+
+ if ($status == 0) {
+ $SEC->Arguments($client_args);
+ $client = $SEC->SpawnWaitKill (60);
+ print "\n";
+
+ $SES->Kill ();
+ if ($client != 0) {
+ print STDERR "ERROR: Sequence_Consumer did not run properly\n";
+ $status = 1;
+ }
+
+ if ($status == 0) {
+ print "********* Running Sequence Consumer with one " .
+ "consumer and one filter *******\n";
+
+ unlink $ior;
+ $SES->Spawn ();
+
+ if (PerlACE::waitforfile_timed ($ior, 20) == -1) {
+ print STDERR "ERROR: waiting for the supplier to start\n";
+ $SES->Kill ();
+ $TS->Kill ();
+ $NS->Kill ();
+ $status = 1;
+ }
+
+ if ($status == 0) {
+ $SEC->Arguments($client_args . " -f -c 1");
+ $client = $SEC->SpawnWaitKill (60);
+ print "\n";
+
+ $SES->Kill ();
+ if ($client != 0) {
+ print STDERR "ERROR: Sequence_Consumer did not run properly\n";
+ $status = 1;
+ }
+ }
+ }
+ }
+}
+
+$TS->Kill ();
+$NS->Kill ();
+
+unlink $ior;
+unlink $notifyior;
+
+
+exit $status;