summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/PICurrent
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Portable_Interceptors/PICurrent')
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/.cvsignore2
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/Makefile.am124
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc22
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/client.cpp24
-rwxr-xr-xTAO/tests/Portable_Interceptors/PICurrent/run_test.pl73
-rw-r--r--TAO/tests/Portable_Interceptors/PICurrent/server.cpp2
6 files changed, 28 insertions, 219 deletions
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore b/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore
new file mode 100644
index 00000000000..f2ad85300eb
--- /dev/null
+++ b/TAO/tests/Portable_Interceptors/PICurrent/.cvsignore
@@ -0,0 +1,2 @@
+client
+server
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/Makefile.am b/TAO/tests/Portable_Interceptors/PICurrent/Makefile.am
deleted file mode 100644
index 3f20b1f4671..00000000000
--- a/TAO/tests/Portable_Interceptors/PICurrent/Makefile.am
+++ /dev/null
@@ -1,124 +0,0 @@
-## Process this file with automake to create Makefile.in
-##
-## $Id$
-##
-## This file was generated by MPC. Any changes made directly to
-## this file will be lost the next time it is generated.
-##
-## MPC Command:
-## ../bin/mwc.pl -type automake -noreldefs TAO.mwc
-
-ACE_BUILDDIR = $(top_builddir)/..
-ACE_ROOT = $(top_srcdir)/..
-TAO_BUILDDIR = $(top_builddir)
-TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl
-TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl
-TAO_IDLFLAGS = -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/gperf
-TAO_ROOT = $(top_srcdir)
-
-noinst_PROGRAMS =
-
-## Makefile.PI_PICurrent_Idl.am
-
-BUILT_SOURCES = \
- testC.cpp \
- testC.h \
- testC.inl \
- testS.cpp \
- testS.h \
- testS.inl
-
-CLEANFILES = \
- test-stamp \
- testC.cpp \
- testC.h \
- testC.inl \
- testS.cpp \
- testS.h \
- testS.inl
-
-testC.cpp testC.h testC.inl testS.cpp testS.h testS.inl: test-stamp
-
-test-stamp: $(srcdir)/test.idl $(TAO_IDL_DEP)
- $(TAO_IDL) $(TAO_IDLFLAGS) -Sa -St $(srcdir)/test.idl
- @touch $@
-
-noinst_HEADERS = \
- test.idl
-
-## Makefile.PI_PICurrent_Server.am
-
-if BUILD_EXCEPTIONS
-if BUILD_INTERCEPTORS
-
-noinst_PROGRAMS += server
-
-server_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR)
-
-server_SOURCES = \
- ClientRequestInterceptor2.cpp \
- ServerORBInitializer.cpp \
- ServerRequestInterceptor.cpp \
- server.cpp \
- testC.cpp \
- testS.cpp \
- test_i.cpp \
- ClientRequestInterceptor2.h \
- ServerORBInitializer.h \
- ServerRequestInterceptor.h \
- test_i.h
-
-server_LDADD = \
- $(TAO_BUILDDIR)/tao/libTAO_PI_Server.la \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif BUILD_INTERCEPTORS
-endif BUILD_EXCEPTIONS
-
-## Makefile.PI_PICurrent_Client.am
-
-if BUILD_EXCEPTIONS
-if BUILD_INTERCEPTORS
-
-noinst_PROGRAMS += client
-
-client_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR)
-
-client_SOURCES = \
- ClientORBInitializer.cpp \
- ClientRequestInterceptor.cpp \
- client.cpp \
- testC.cpp \
- ClientORBInitializer.h \
- ClientRequestInterceptor.h
-
-client_LDADD = \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif BUILD_INTERCEPTORS
-endif BUILD_EXCEPTIONS
-
-## Clean up template repositories, etc.
-clean-local:
- -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.*
- -rm -f gcctemp.c gcctemp so_locations *.ics
- -rm -rf cxx_repository ptrepository ti_files
- -rm -rf templateregistry ir.out
- -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc b/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
index c638d946a1a..39a60cd5c75 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
+++ b/TAO/tests/Portable_Interceptors/PICurrent/PI_PICurrent.mpc
@@ -1,15 +1,7 @@
// -*- MPC -*-
// $Id$
-project(*idl): taoidldefaults {
- IDL_Files {
- test.idl
- }
- custom_only = 1
-}
-
project(*Server): taoserver, pi_server, interceptors {
- after += *idl
Source_Files {
test_i.cpp
ServerORBInitializer.cpp
@@ -17,25 +9,15 @@ project(*Server): taoserver, pi_server, interceptors {
ClientRequestInterceptor2.cpp
server.cpp
}
- Source_Files {
- testC.cpp
- testS.cpp
- }
- IDL_Files {
- }
}
project(*Client): taoclient, pi, interceptors {
- after += *idl
after += *Server
Source_Files {
+ testC.cpp
ClientORBInitializer.cpp
ClientRequestInterceptor.cpp
client.cpp
}
- Source_Files {
- testC.cpp
- }
- IDL_Files {
- }
}
+
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
index 2cd36a5cd9c..4d98648a2ac 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/client.cpp
@@ -1,7 +1,6 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
#include "testC.h"
#include "ClientORBInitializer.h"
@@ -116,28 +115,6 @@ main (int argc, char *argv[])
1);
}
- // BUG 2656 testing - _get_policy_overrides() should return an empty
- // sequence rather than nill.
- CORBA::PolicyTypeSeq types;
- CORBA::PolicyList_var policies = server->_get_policy_overrides(types);
-
- if (policies.ptr () == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) _get_policy_overrides returned nill pointer\n"));
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- else
- {
- CORBA::ULong const list_size = policies->length();
- if (list_size != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) _get_policy_overrides returned list with size not equal 0\n"));
- ACE_TRY_THROW (CORBA::INTERNAL ());
- }
- }
-
server->invoke_me (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -172,7 +149,6 @@ main (int argc, char *argv[])
server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_OS::sleep(1);
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl b/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl
index 64932b1e51d..8c021fc59c4 100755
--- a/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl
+++ b/TAO/tests/Portable_Interceptors/PICurrent/run_test.pl
@@ -5,71 +5,46 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# -*- perl -*-
# $Id$
-use lib "$ENV{ACE_ROOT}/bin";
+use lib '../../../../bin';
use PerlACE::Run_Test;
$status = 0;
$file = PerlACE::LocalFile ("test.ior");
-$cvsfile= PerlACE::LocalFile ("svc.conf");
-unlink $cvsfile;
-sub DoTest
-{
- $status = 0;
-
- if (PerlACE::is_vxworks_test()) {
- $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
- }
- else {
- $SV = new PerlACE::Process ("server", "-o $file");
- }
- $CL = new PerlACE::Process ("client", "-k file://$file");
-
- print STDERR "\n\n==== Running PICurrent test\n";
+unlink $file;
- unlink $file;
- $SV->Spawn ();
+if (PerlACE::is_vxworks_test()) {
+ $SV = new PerlACE::ProcessVX ("server", "-o test.ior");
+}
+else {
+ $SV = new PerlACE::Process ("server", "-o $file");
+}
+$CL = new PerlACE::Process ("client", "-k file://$file");
- if (PerlACE::waitforfile_timed ($file, 15) == -1) {
- print STDERR "ERROR: cannot find file <$file>\n";
- $SV->Kill ();
- return 1;
- }
+print STDERR "\n\n==== Running PICurrent test\n";
- $client = $CL->SpawnWaitKill (60);
+$SV->Spawn ();
- if ($client != 0) {
- print STDERR "ERROR: client returned $client\n";
- $status = 1;
- }
+if (PerlACE::waitforfile_timed ($file, 15) == -1) {
+ print STDERR "ERROR: cannot find file <$file>\n";
+ $SV->Kill ();
+ exit 1;
+}
- $serverexit = $SV->WaitKill (20);
+$client = $CL->SpawnWaitKill (60);
- if ($serverexit != 0) {
- print STDERR "ERROR: server returned $serverexit\n";
- $status = $serverexit;
- }
-
- return $status;
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
+ $status = 1;
}
-print STDERR "\n\n==== Without svc.conf (single-threaded)\n";
-$status= DoTest();
-if (0 != $status) {
- exit $status
-}
+$server = $SV->WaitKill (5);
-$line= "static Server_Strategy_Factory \"-ORBConcurrency thread-per-connection\"\n";
-open ($fh, '>', $cvsfile);
-syswrite ($fh, $line);
-close ($fh);
-print STDERR "\n\n==== With svc.conf (thread-per-connection)\n";
-$status= DoTest();
-if (0 != $status) {
- exit $status
+if ($server != 0) {
+ print STDERR "ERROR: server returned $server\n";
+ $status = 1;
}
unlink $file;
-unlink $cvsfile;
exit $status;
diff --git a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp b/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
index 46f5cde72a1..3e0b650480f 100644
--- a/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
+++ b/TAO/tests/Portable_Interceptors/PICurrent/server.cpp
@@ -1,7 +1,6 @@
// -*- C++ -*-
#include "ace/Get_Opt.h"
-#include "ace/OS_NS_unistd.h"
#include "test_i.h"
#include "ServerORBInitializer.h"
@@ -145,7 +144,6 @@ main (int argc, char *argv[])
orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- ACE_OS::sleep(1);
orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;