diff options
Diffstat (limited to 'TAO/tests/RTCORBA/ORB_init')
-rw-r--r-- | TAO/tests/RTCORBA/ORB_init/.cvsignore | 1 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/ORB_init/ORB_init.cpp | 132 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/ORB_init/README | 6 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc | 6 | ||||
-rwxr-xr-x | TAO/tests/RTCORBA/ORB_init/run_test.pl | 27 |
5 files changed, 0 insertions, 172 deletions
diff --git a/TAO/tests/RTCORBA/ORB_init/.cvsignore b/TAO/tests/RTCORBA/ORB_init/.cvsignore deleted file mode 100644 index c32f7b71039..00000000000 --- a/TAO/tests/RTCORBA/ORB_init/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -ORB_init diff --git a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp deleted file mode 100644 index 9277febd56e..00000000000 --- a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp +++ /dev/null @@ -1,132 +0,0 @@ -// $Id$ - -#include "tao/RTCORBA/RTCORBA.h" -#include "tao/ORB.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_stdio.h" - -int -test_multiple_orbs (const char *test_name, - int argc, - char *argv[], - int iterations, - int rt_orb, - int destroy) -{ - CORBA::ORB_var *orbs = - new CORBA::ORB_var[iterations]; - - RTCORBA::RTORB_var *rt_orbs = - new RTCORBA::RTORB_var[iterations]; - - ACE_TRY_NEW_ENV - { - for (int i = 0; - i < iterations; - ++i) - { - char name[100]; - ACE_OS::sprintf (name, "%s %d", test_name, i); - - orbs[i] = - CORBA::ORB_init (argc, - argv, - name - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (rt_orb) - { - CORBA::Object_var object = - orbs[i]->resolve_initial_references ("RTORB" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - rt_orbs[i] = - RTCORBA::RTORB::_narrow (object.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_ASSERT (rt_orbs[i].in () != RTCORBA::RTORB::_nil ()); - } - } - - if (destroy) - { - for (int i = 0; - i < iterations; - ++i) - { - orbs[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Unexpected exception caught in ORB_init"); - return -1; - } - ACE_ENDTRY; - - delete[] rt_orbs; - delete[] orbs; - - return 0; -} - -int -main (int argc, char *argv[]) -{ - int iterations = 5; - int rt_orb = 0; - int destroy = 0; - - int result = - test_multiple_orbs ("non-RT ORBs, disable destroy", - argc, - argv, - iterations, - rt_orb, - destroy); - ACE_ASSERT (result == 0); - - destroy = 1; - rt_orb = 0; - - result = - test_multiple_orbs ("non-RT ORBs, enable destroy", - argc, - argv, - iterations, - rt_orb, - destroy); - ACE_ASSERT (result == 0); - - destroy = 0; - rt_orb = 1; - - result = - test_multiple_orbs ("RT ORBs, disable destroy", - argc, - argv, - iterations, - rt_orb, - destroy); - ACE_ASSERT (result == 0); - - destroy = 1; - rt_orb = 1; - - result = - test_multiple_orbs ("RT ORBs, enable destroy", - argc, - argv, - iterations, - rt_orb, - destroy); - ACE_ASSERT (result == 0); - - return result; -} diff --git a/TAO/tests/RTCORBA/ORB_init/README b/TAO/tests/RTCORBA/ORB_init/README deleted file mode 100644 index c7aa666a92e..00000000000 --- a/TAO/tests/RTCORBA/ORB_init/README +++ /dev/null @@ -1,6 +0,0 @@ -$Id$ - -This is a unit test for the creation of multiple RT ORBs. - - - diff --git a/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc b/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc deleted file mode 100644 index 54605e4c57a..00000000000 --- a/TAO/tests/RTCORBA/ORB_init/RTCORBA_ORB_init.mpc +++ /dev/null @@ -1,6 +0,0 @@ -// $Id$ - -project (ORB_init_RT) : rt_client { - exename = ORB_init -} - diff --git a/TAO/tests/RTCORBA/ORB_init/run_test.pl b/TAO/tests/RTCORBA/ORB_init/run_test.pl deleted file mode 100755 index 356ff8edb52..00000000000 --- a/TAO/tests/RTCORBA/ORB_init/run_test.pl +++ /dev/null @@ -1,27 +0,0 @@ -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; - -print STDERR "\n********** RTCORBA ORB_init Unit Test **********\n\n"; - -if (PerlACE::is_vxworks_test()) { - $T = new PerlACE::ProcessVX ("ORB_init"); -} -else { - $T = new PerlACE::Process ("ORB_init"); -} - -$test = $T->SpawnWaitKill (60); - -if ($test != 0) { - print STDERR "ERROR: test returned $test\n"; - exit 1; -} - -exit 0; |