summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl')
-rwxr-xr-xTAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl95
1 files changed, 95 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
new file mode 100755
index 00000000000..09e002da4f3
--- /dev/null
+++ b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl
@@ -0,0 +1,95 @@
+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;
+
+$persistent = "-p";
+
+$status = 0;
+
+$iorfile = "if_repo.ior";
+$backing_file = PerlACE::LocalFile ("ifr_default_backing_store");
+
+$init_ref = "-ORBInitRef InterfaceRepository=file://$iorfile";
+
+$debug = "";
+$query_opt = "-q";
+$other = "";
+
+for ($i = 0; $i <= $#ARGV; $i++) {
+ if ($ARGV[$i] eq "-d") {
+ $debug = "-d";
+ }
+ else {
+ $other .= $ARGV[$i];
+ }
+}
+
+unlink $iorfile;
+unlink $backing_file;
+
+$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " -o $iorfile" . " $persistent");
+$T = new PerlACE::Process ("Persistence_Test");
+
+$IFR->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $IFR->Kill ();
+ exit 1;
+}
+
+$T->Arguments ($init_ref);
+
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: populate test returned $test\n";
+ $status = 1;
+}
+
+$server = $IFR->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: IFR returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+
+$IFR->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $IFR->Kill ();
+ exit 1;
+}
+
+$T->Arguments ("$init_ref $debug $query_opt");
+
+
+$test = $T->SpawnWaitKill (60);
+
+if ($test != 0) {
+ print STDERR "ERROR: query test returned $test\n";
+ $status = 1;
+}
+
+
+$server = $IFR->TerminateWaitKill (5);
+
+if ($server != 0) {
+ print STDERR "ERROR: IFR returned $server\n";
+ $status = 1;
+}
+
+unlink $iorfile;
+unlink $backing_file;
+
+exit $status;
+