diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-01 20:29:32 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-07-01 20:29:32 +0000 |
commit | 154c07444e9837f3bf8e94779f1d77b05f280ddc (patch) | |
tree | 481c48aa9e3b4baeb298f7b1b1fa5e221ffffa8c | |
parent | 597c2f4c760e722fd1c01b96f921a68f35300fd5 (diff) | |
download | ATCD-154c07444e9837f3bf8e94779f1d77b05f280ddc.tar.gz |
Thu Jul 1 15:26:54 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
18 files changed, 1328 insertions, 0 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 8d347c4700b..7d89fb4e7b4 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,25 @@ +Thu Jul 1 15:26:54 2004 Jaiganesh B <jai@dre.vanderbilt.edu> + + * DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc: + * DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl: + * DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl: + * DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp: + * DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp: + * DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp: + * DAnCE/tests/NodeApplicationTest/README: + * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp: + * DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h: + * DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h: + * DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h: + * DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h: + * DAnCE/tests/NodeApplicationTest/run_test.pl: + * DAnCE/tests/NodeApplicationTest/run_test_ex.pl: + * DAnCE/tests/NodeApplicationTest/run_test_simple.pl: + * DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl: + * DAnCE/tests/scripts/BasicSP/basicsp.dat: + + First cut checkins for new DAnCE directory. + Thu Jul 1 14:46:24 2004 Jaiganesh B <jai@dre.vanderbilt.edu> * DnC/Config_Handlers/Plan_Handler.cpp: diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc new file mode 100644 index 00000000000..11261df6e8e --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest.mpc @@ -0,0 +1,98 @@ +// $Id$ + +project(NodeAppTest_RoundTrip_stub): ciao_client_dnc { + sharedname = NodeAppTest_RoundTrip_stub + + idlflags += -Wb,stub_export_macro=NODEAPPTEST_ROUNDTRIP_STUB_Export -Wb,stub_export_include=RoundTrip_stub_export.h -Wb,skel_export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export -Wb,skel_export_include=RoundTrip_svnt_export.h + dynamicflags = NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL + + IDL_Files { + NodeAppTest_RoundTrip.idl + } + + Source_Files { + NodeAppTest_RoundTripC.cpp + } +} + +project(NodeAppTest_RoundTrip_svnt) : ciao_servant_dnc { + after += NodeAppTest_RoundTrip_stub + sharedname = NodeAppTest_RoundTrip_svnt + + libs += NodeAppTest_RoundTrip_stub + idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_SVNT_Export -Wb,export_include=RoundTrip_svnt_export.h + dynamicflags = NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL + + CIDL_Files { + NodeAppTest_RoundTrip.cidl + } + + IDL_Files { + NodeAppTest_RoundTripE.idl + } + + Source_Files { + NodeAppTest_RoundTripEC.cpp + NodeAppTest_RoundTripS.cpp + NodeAppTest_RoundTrip_svnt.cpp + } +} + +project(NodeAppTest_RoundTrip_exec) : ciao_component_dnc { + after += NodeAppTest_RoundTrip_svnt + + sharedname = NodeAppTest_RoundTrip_exec + libs += NodeAppTest_RoundTrip_stub NodeAppTest_RoundTrip_svnt + idlflags += -Wb,export_macro=NODEAPPTEST_ROUNDTRIP_EXEC_Export -Wb,export_include=RoundTrip_exec_export.h + dynamicflags = NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + RoundTrip_exec.cpp + } +} + +project (NodeAppTest_client_simple) : ciao_server_dnc { + after += NodeAppTest_RoundTrip_exec + + libs += NodeAppTest_RoundTrip_stub + exename += client_simple + + IDL_Files { + } + + Source_Files { + NodeApp_test_client_simple.cpp + } +} + +project (NodeAppTest_client) : ciao_server_dnc { + after += NodeAppTest_RoundTrip_exec + libs += NodeAppTest_RoundTrip_stub + exename += client + + + IDL_Files { + } + + Source_Files { + NodeApp_test_client.cpp + } +} + +project (NodeAppTest_client_ex) : ciao_server_dnc { + after += NodeAppTest_RoundTrip_exec + + libs += NodeAppTest_RoundTrip_stub + + exename += client_ex + + IDL_Files { + } + + Source_Files { + NodeApp_test_client_ex.cpp + } +} diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl new file mode 100644 index 00000000000..f620ec569d0 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.cidl @@ -0,0 +1,19 @@ +// $Id$ + +#ifndef NODEAPPTEST_ROUNDTRIP_CIDL +#define NODEAPPTEST_ROUNDTRIP_CIDL + +#include "NodeAppTest_RoundTrip.idl" + +composition session RoundTrip_Impl +{ + + home executor RoundTripHome_Exec + { + implements NodeAppTest::NodeAppTest_RoundTripHome; + manages RoundTrip_Exec; + }; + +}; + +#endif /* NODEAPPTEST_ROUNDTRIP_CIDL */ diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl new file mode 100644 index 00000000000..e57258ea41c --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeAppTest_RoundTrip.idl @@ -0,0 +1,34 @@ +// $Id$ + +//============================================================================= +/** + * @file RoundTrip.idl + * + * Definition of the Component that provides the LatencyTest interface + * + */ +//============================================================================= +#ifndef NODEAPP_ROUNDTRIP_IDL +#define NODEAPP_ROUNDTRIP_IDL + +#include <Components.idl> + +module NodeAppTest +{ + interface LatencyTest + { + long cube_long (in long param); + }; + + component NodeAppTest_RoundTrip supports LatencyTest + { + provides LatencyTest facet_1; + provides LatencyTest facet_2; + }; + + home NodeAppTest_RoundTripHome manages NodeAppTest_RoundTrip + { + }; + +}; +#endif /* NODEAPP_ROUNDTRIP_IDL */ diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp new file mode 100644 index 00000000000..dc21fa0fdfb --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client.cpp @@ -0,0 +1,202 @@ +// $Id$ + +#include "Deployment_CoreC.h" +#include "Client_init.h" +#include "NodeAppTest_RoundTripC.h" +#include "ace/Get_Opt.h" +#include <sstream> +#include <vector> +#include <stdlib.h> + +const char *ior = "file://test.ior"; +int comp_number = 4; + +int parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:n:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case 'n': + comp_number = atoi (get_opts.opt_arg ()); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s \n" + "-k <NodeApplication ior> \n" + "-n <The number of component instances> \n" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + +int +main (int argc, char *argv[]) +{ + std::vector<NodeAppTest::NodeAppTest_RoundTrip_var> comp_list; + //std::vector<NodeAppTest::NodeAppTest_RoundTrip_var>::const_iterator iter; + + ACE_TRY_NEW_ENV + { + CORBA::ULong comp_num (comp_number); + ACE_DEBUG ((LM_DEBUG, "CompNum: %d\n",comp_num)); + + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args (argc, argv) != 0) + return 1; + + CIAO::Client_init (orb.in ()); + + CORBA::Object_var tmp = + orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + Deployment::NodeApplication_var comserv = + Deployment::NodeApplication::_narrow(tmp.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (comserv.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil ServerActivator reference <%s>\n", ior), + 1); + } + + // This is what we will send out, containing all the instance info the + // container needs + Deployment::ImplementationInfos infos; + infos.length (CORBA::ULong (comp_num)); + + // This is what we will get back, a sequence of compoent object refs. + Deployment::ComponentInfos_var comp_info; + + CORBA::ULong i; + for (i = 0; i < comp_num; ++i) + { + Deployment::ImplementationInfo info; + + std::stringstream tmp; + tmp << "NodeAppTest_RoundTrip:" << i; + + // Add the names and entry points of each of the DLLs + info.component_instance_name = + CORBA::string_dup (tmp.str ().c_str ()); + info.executor_dll = CORBA::string_dup ("NodeAppTest_RoundTrip_exec"); + info.executor_entrypt = + CORBA::string_dup ("createRoundTripHome_Impl"); + info.servant_dll = + CORBA::string_dup ("NodeAppTest_RoundTrip_svnt"); + info.servant_entrypt = + CORBA::string_dup ("createNodeAppTest_RoundTripHome_Servant"); + + //Now add the info into the infos + infos[i] = info; + } + + // For debug purpose. + for (i = 0; i < comp_num; ++i) + { + Deployment::ImplementationInfo info; + + std::stringstream tmp; + tmp << "NodeAppTest_RoundTrip:" << i; + + // Add the names and entry points of each of the DLLs + ACE_DEBUG ((LM_DEBUG, + "The info I will send out: \n\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n", + infos[i].component_instance_name.in (), + infos[i].executor_dll.in (), + infos[i].executor_entrypt.in (), + infos[i].servant_dll.in (), + infos[i].servant_entrypt.in () )); + } + + ACE_DEBUG ((LM_DEBUG, "Try installing Homes and Components\n")); + + // Install the NodeApplication Test components + comp_info = comserv->install (infos); + ACE_TRY_CHECK; + + // store the component refs + for (i = 0; i < comp_num; ++i) + { + comp_list.push_back (NodeAppTest::NodeAppTest_RoundTrip::_narrow + (comp_info[i].component_ref)); + ACE_TRY_CHECK; + + if (CORBA::is_nil (comp_list[i].in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil RoundTripHome reference: %s \n", + comp_info[i].component_instance_name.in ()), + 1); + } + } + + ACE_DEBUG ((LM_DEBUG, "Installation finished successfully.\n")); + + // Before we can start we have to start. + comserv->start (); + ACE_CHECK_RETURN (1); + + // Invoke Operation on the components + ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); + + for (i = 0; i < comp_num; ++i) + { + + CORBA::Long input = i; + + CORBA::Long output = + (comp_list[i])->cube_long (input ACE_ENV_ARG_PARAMETER); + + if (input*input*input == output) + { + ACE_DEBUG ((LM_DEBUG, + "Return values matched!! on Component: %d \n", + i)); + } + else + { + ACE_DEBUG ((LM_DEBUG, + "Return values did not match: on Component: %d \n", + i)); + exit (1); + } + } + + ACE_DEBUG ((LM_DEBUG, "Try removing everything\n")); + comserv->remove (); + ACE_CHECK_RETURN (1); + + ACE_DEBUG ((LM_DEBUG, "Homes removed successfully\n")); + + orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Exception caught:"); + return 1; + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp new file mode 100644 index 00000000000..d07d4440d7b --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_ex.cpp @@ -0,0 +1,169 @@ +// $Id$ + +#include "ciao/Deployment_CoreC.h" +#include "ciao/Client_init.h" +#include "NodeAppTest_RoundTripC.h" +#include "ace/Get_Opt.h" + +const char *ior = "file://test.ior"; + +int +parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s \n" + "-k <NodeApplication ior> \n" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + +int +main (int argc, char *argv[]) +{ + ACE_TRY_NEW_ENV + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args (argc, argv) != 0) + return 1; + + CIAO::Client_init (orb.in ()); + + CORBA::Object_var tmp = + orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + Deployment::NodeApplication_var comserv = + Deployment::NodeApplication::_narrow(tmp.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (comserv.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil NodeApplication reference <%s>\n", + ior), + 1); + } + + + ACE_DEBUG ((LM_DEBUG, "Try installing Home\n")); + + Deployment::ImplementationInfo info; + + // Add the names and entry points of each of the DLLs + info.component_instance_name = "NodeAppTest_RoundTrip"; + info.executor_dll = "NodeAppTest_RoundTrip_exec"; + info.executor_entrypt = "createRoundTripHome_Impl"; + info.servant_dll = "NodeAppTest_RoundTrip_svnt"; + info.servant_entrypt = "createNodeAppTest_RoundTripHome_Servant"; + + // Install the NodeApplication Test component + ::Components::CCMHome_var home = comserv->install_home (info); + ACE_TRY_CHECK; + + // Narrow the Home to the appropriate component + NodeAppTest::NodeAppTest_RoundTripHome_var home_var = + NodeAppTest::NodeAppTest_RoundTripHome::_narrow (home.in ()); + + ACE_TRY_CHECK; + if (CORBA::is_nil (home_var.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil RoundTripHome reference\n"), + 1); + } + + // Get Component from Home + ACE_DEBUG ((LM_DEBUG, "Try obtaining RoundTrip component ref from Home\n")); + NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_comp_var = + NodeAppTest::NodeAppTest_RoundTrip::_narrow ( + home_var->create + (ACE_ENV_SINGLE_ARG_PARAMETER) + ); + ACE_TRY_CHECK; + if (CORBA::is_nil (roundtrip_comp_var.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil RoundTrip component reference\n"), + 1); + } + + ACE_TRY_CHECK; + // initialize the component + roundtrip_comp_var->ciao_postactivate (); + ACE_CHECK_RETURN (1); + + + //get the provided facets info. + Components::FacetDescriptions_var facets_info = + roundtrip_comp_var->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER) ; + ACE_TRY_CHECK; + + if ( facets_info->length () != 2 ) + { + ACE_DEBUG((LM_DEBUG, "Didn't get 2 facet back! but only %d\n", + facets_info->length ())); + return 1; + } + + // Invoke Operation on the Interface + ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); + + for (CORBA::ULong i = 0; i < 2; ++i ) + { + NodeAppTest::LatencyTest_var latency_var + = NodeAppTest::LatencyTest::_narrow ( (facets_info[i]->facet_ref ())); + ACE_DEBUG((LM_DEBUG, "Calling on facet %s\n", (facets_info[i]->name ()))); + + ACE_TRY_CHECK; + + if ( CORBA::is_nil (latency_var.in ()) ) + { + ACE_DEBUG((LM_DEBUG, "get nil latency ref for facet%d\n", i)); + return 1; + } + + CORBA::Long input = 1L; + CORBA::Long output = + latency_var->cube_long (input ACE_ENV_ARG_PARAMETER); + if (input == output) + ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n")); + else + { + ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n")); + exit (1); + } + } + orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Exception caught:"); + return 1; + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp new file mode 100644 index 00000000000..6c497e81255 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/NodeApp_test_client_simple.cpp @@ -0,0 +1,140 @@ +// $Id$ + +#include "Deployment_CoreC.h" +#include "Client_init.h" +#include "NodeAppTest_RoundTripC.h" +#include "ace/Get_Opt.h" + +const char *ior = "file://test.ior"; + +int +parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:"); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s \n" + "-k <ComponentServer ior> \n" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + +int +main (int argc, char *argv[]) +{ + ACE_TRY_NEW_ENV + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (parse_args (argc, argv) != 0) + return 1; + + CIAO::Client_init (orb.in ()); + + CORBA::Object_var tmp = + orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + Deployment::NodeApplication_var comserv = + Deployment::NodeApplication::_narrow(tmp.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (CORBA::is_nil (comserv.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil ServerActivator reference <%s>\n", + ior), + 1); + } + + + ACE_DEBUG ((LM_DEBUG, "Try installing Home\n")); + + Deployment::ImplementationInfo info; + + // Add the names and entry points of each of the DLLs + info.component_instance_name = "NodeAppTest_RoundTrip"; + info.executor_dll = "NodeAppTest_RoundTrip_exec"; + info.executor_entrypt = "createRoundTripHome_Impl"; + info.servant_dll = "NodeAppTest_RoundTrip_svnt"; + info.servant_entrypt = "createNodeAppTest_RoundTripHome_Servant"; + + // Install the NodeApplication Test component + ::Components::CCMHome_var home = comserv->install_home (info); + ACE_TRY_CHECK; + + // Narrow the Home to the appropriate component + NodeAppTest::NodeAppTest_RoundTripHome_var home_var = + NodeAppTest::NodeAppTest_RoundTripHome::_narrow (home.in ()); + + ACE_TRY_CHECK; + if (CORBA::is_nil (home_var.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil RoundTripHome reference\n"), + 1); + } + + // Get Component from Home + ACE_DEBUG ((LM_DEBUG, "Try obtaining RoundTrip ref from Home\n")); + NodeAppTest::NodeAppTest_RoundTrip_var roundtrip_var = + home_var->create (ACE_ENV_SINGLE_ARG_PARAMETER); + + if (CORBA::is_nil (roundtrip_var.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil RoundTrip reference\n"), + 1); + } + + ACE_TRY_CHECK; + + // Invoke Operation on the Interface + ACE_DEBUG ((LM_DEBUG, "Try cube_long operation on the Interface \n")); + CORBA::Long input = 1L; + CORBA::Long output = + roundtrip_var->cube_long (input ACE_ENV_ARG_PARAMETER); + + if (input == output) + ACE_DEBUG ((LM_DEBUG, "Retrun values matched!!\n")); + else + { + ACE_DEBUG ((LM_DEBUG, "Return values did not match: failure\n")); + exit (1); + } + + ACE_DEBUG ((LM_DEBUG, "Try removing home\n")); + comserv->remove_home (info.component_instance_name); + ACE_DEBUG ((LM_DEBUG, "Home removed successfully\n")); + + orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + ACE_DEBUG ((LM_DEBUG, "Test success!!\n")); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Exception caught:"); + return 1; + } + ACE_ENDTRY; + + return 0; +} diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/README b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/README new file mode 100644 index 00000000000..ea8fc438089 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/README @@ -0,0 +1,12 @@ +$Id$ +This directory contains the basic testing program for NodeApplication. + +client_simple: Test the basic home installation and component creation. + +client: Test the installation of several homes and components. + In this test I use the more convenient method provided + by the NodeApplication to insall multiple components. Aslo + a remove method is called to easily remove all homes and components. + +client_ex: Test the get_all_facet methods provided in the servant of the + component. diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp new file mode 100644 index 00000000000..80f9a547255 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.cpp @@ -0,0 +1,133 @@ +// $Id$ + +#include "RoundTrip_exec.h" +#include "CIAO_common.h" + +//-- ACE Scheduling Params +#include "ace/OS_NS_errno.h" + +//================================================================= + +RoundTrip_Impl::RoundTrip_exec_i::RoundTrip_exec_i () +{ + +} + +RoundTrip_Impl::RoundTrip_exec_i::~RoundTrip_exec_i () +{ +} + +NodeAppTest::CCM_LatencyTest_ptr +RoundTrip_Impl::RoundTrip_exec_i::get_facet_1(ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return new RoundTrip_Impl::LatencyTest_Impl (); +} + +NodeAppTest::CCM_LatencyTest_ptr +RoundTrip_Impl::RoundTrip_exec_i::get_facet_2(ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return new RoundTrip_Impl::LatencyTest_Impl (); +} + +CORBA::Long +RoundTrip_Impl::RoundTrip_exec_i::cube_long (CORBA::Long data) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return data*data*data; +} + +// Operations from Components::SessionComponent +void +RoundTrip_Impl::RoundTrip_exec_i::set_session_context (Components::SessionContext_ptr + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::set_session_context\n")); + ACE_CHECK; + +} + +void +RoundTrip_Impl::RoundTrip_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::ccm_activate\n")); + +} + +void +RoundTrip_Impl::RoundTrip_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::ccm_passivate\n")); +} + +void +RoundTrip_Impl::RoundTrip_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::ccm_remove\n")); +} + +void +RoundTrip_Impl::RoundTrip_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::ciao_preactivate\n")); + +} + +void +RoundTrip_Impl::RoundTrip_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "RoundTrip_Impl::RoundTrip_exec_i::ciao_postactivate\n")); +} + +RoundTrip_Impl::RoundTripHome_exec_i::RoundTripHome_exec_i () +{ +} + +RoundTrip_Impl::RoundTripHome_exec_i::~RoundTripHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +RoundTrip_Impl::RoundTripHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + return new RoundTrip_Impl::RoundTrip_exec_i (); +} + +// Implementation for the probided inferface. +CORBA::Long +RoundTrip_Impl::LatencyTest_Impl::cube_long (CORBA::Long data) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return data*data*data; +} + +extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export +::Components::HomeExecutorBase_ptr +createRoundTripHome_Impl (void) +{ + if (CIAO::debug_level () > 0) + ACE_DEBUG ((LM_DEBUG, "Creating Round_trip impl\n")); + + return new RoundTrip_Impl::RoundTripHome_exec_i (); +} diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h new file mode 100644 index 00000000000..12815a1171a --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec.h @@ -0,0 +1,136 @@ +// $Id$ + +//============================================================ +/** + * @file RoundTrip_exec.h + * + * Header file for the Executor implementation. + * + * @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu> + */ +//============================================================ + +#ifndef NODEAPP_ROUNDTRIP_EXEC_H +#define NODEAPP_ROUNDTRIP_EXEC_H + +#include "NodeAppTest_RoundTripEC.h" +#include "RoundTrip_exec_export.h" +#include "tao/LocalObject.h" + +namespace RoundTrip_Impl +{ + + /** + * @class RoundTrip_exec_i + * + * RoundTrip executor implementation class. + */ + + class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTrip_exec_i : + public virtual NodeAppTest::LatencyTest, + public virtual RoundTrip_Impl::RoundTrip_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + RoundTrip_exec_i (); + + /// Default destructor. + ~RoundTrip_exec_i (); + + /// Operation to test the data + virtual CORBA::Long cube_long (CORBA::Long data) + ACE_THROW_SPEC ((CORBA::SystemException)); + + /* + virtual ::NodeAppTest::CCM_LatencyTest* + get_latency (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + */ + + NodeAppTest::CCM_LatencyTest_ptr + get_facet_1(ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + + NodeAppTest::CCM_LatencyTest_ptr + get_facet_2(ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + /// Helper function to be called back by timeout_Handler + void pulse (void); + + // CIAO defined methods + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + }; + + // + // + // + class LatencyTest_Impl : public virtual NodeAppTest::CCM_LatencyTest, + public virtual TAO_Local_RefCounted_Object + { + public: + LatencyTest_Impl () + { + } + + virtual CORBA::Long cube_long (CORBA::Long data) + ACE_THROW_SPEC ((CORBA::SystemException)); + }; + + /** + * @class RoundTripHome_exec_i + * + * RoundTrip home executor implementation class. + */ + class NODEAPPTEST_ROUNDTRIP_EXEC_Export RoundTripHome_exec_i : + public virtual RoundTrip_Impl::RoundTripHome_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + /// Default ctor. + RoundTripHome_exec_i (); + + /// Default dtor. + ~RoundTripHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + }; + +} + +extern "C" NODEAPPTEST_ROUNDTRIP_EXEC_Export +::Components::HomeExecutorBase_ptr createRoundTripHome_Impl (void); + +#endif /* NODEAPP_ROUNDTRIPGEN_EXEC_H */ diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h new file mode 100644 index 00000000000..ba26507df22 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_EXEC +// ------------------------------ +#ifndef NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H +#define NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) +# define NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL 1 +#endif /* ! NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL */ + +#if defined (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1) +# if defined (NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL) +# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Export_Flag +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */ +# define NODEAPPTEST_ROUNDTRIP_EXEC_Export ACE_Proper_Import_Flag +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* NODEAPPTEST_ROUNDTRIP_EXEC_BUILD_DLL */ +#else /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */ +# define NODEAPPTEST_ROUNDTRIP_EXEC_Export +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARATION(T) +# define NODEAPPTEST_ROUNDTRIP_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_HAS_DLL == 1 */ + +// Set NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE */ + +#if (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X) +#else /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define NODEAPPTEST_ROUNDTRIP_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (NODEAPPTEST_ROUNDTRIP_EXEC_NTRACE == 1) */ + +#endif /* NODEAPPTEST_ROUNDTRIP_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h new file mode 100644 index 00000000000..d82c188c509 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_STUB +// ------------------------------ +#ifndef NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H +#define NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) +# define NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL 1 +#endif /* ! NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL */ + +#if defined (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1) +# if defined (NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL) +# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Export_Flag +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */ +# define NODEAPPTEST_ROUNDTRIP_STUB_Export ACE_Proper_Import_Flag +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* NODEAPPTEST_ROUNDTRIP_STUB_BUILD_DLL */ +#else /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */ +# define NODEAPPTEST_ROUNDTRIP_STUB_Export +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARATION(T) +# define NODEAPPTEST_ROUNDTRIP_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* NODEAPPTEST_ROUNDTRIP_STUB_HAS_DLL == 1 */ + +// Set NODEAPPTEST_ROUNDTRIP_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define NODEAPPTEST_ROUNDTRIP_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !NODEAPPTEST_ROUNDTRIP_STUB_NTRACE */ + +#if (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X) +#else /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define NODEAPPTEST_ROUNDTRIP_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (NODEAPPTEST_ROUNDTRIP_STUB_NTRACE == 1) */ + +#endif /* NODEAPPTEST_ROUNDTRIP_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h new file mode 100644 index 00000000000..b84617f9ff0 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/RoundTrip_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl NODEAPPTEST_ROUNDTRIP_SVNT +// ------------------------------ +#ifndef NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H +#define NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) +# define NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL 1 +#endif /* ! NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL */ + +#if defined (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL) && (NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1) +# if defined (NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL) +# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Export_Flag +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */ +# define NODEAPPTEST_ROUNDTRIP_SVNT_Export ACE_Proper_Import_Flag +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* NODEAPPTEST_ROUNDTRIP_SVNT_BUILD_DLL */ +#else /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */ +# define NODEAPPTEST_ROUNDTRIP_SVNT_Export +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARATION(T) +# define NODEAPPTEST_ROUNDTRIP_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_HAS_DLL == 1 */ + +// Set NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE */ + +#if (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) +# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X) +#else /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define NODEAPPTEST_ROUNDTRIP_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (NODEAPPTEST_ROUNDTRIP_SVNT_NTRACE == 1) */ + +#endif /* NODEAPPTEST_ROUNDTRIP_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl new file mode 100755 index 00000000000..66bd2b1120f --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test.pl @@ -0,0 +1,47 @@ +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; + +$status = 0; +$iorfile = PerlACE::LocalFile ("test.ior"); + +for ($iter = 0; $iter <= $#ARGV; $iter++) { + if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { + print "Run_Test Perl script for NodeApplicationTest \n\n"; + print "run_test \n"; + print "\n"; + print "-h -- prints this information\n"; + exit 0; + } +} + + +unlink $iorfile; +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeApplication/NodeApplication", + "-n -o $iorfile"); + +$CL = new PerlACE::Process ("client", + "-k file://$iorfile -n 4"); + +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); + exit 1; +} + +$CL->SpawnWaitKill (10); +$server = $SV->Kill (); + +unlink $iorfile; + +exit $status; diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl new file mode 100755 index 00000000000..1840175abde --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_ex.pl @@ -0,0 +1,47 @@ +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; + +$status = 0; +$iorfile = PerlACE::LocalFile ("test.ior"); + +for ($iter = 0; $iter <= $#ARGV; $iter++) { + if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { + print "Run_Test Perl script for NodeApplicationTest \n\n"; + print "run_test \n"; + print "\n"; + print "-h -- prints this information\n"; + exit 0; + } +} + + +unlink $iorfile; +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeApplication/NodeApplication", + "-n -o $iorfile"); + +$CL = new PerlACE::Process ("client_ex", + "-k file://$iorfile"); + +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); + exit 1; +} + +$CL->SpawnWaitKill (10); +$server = $SV->Kill (); + +unlink $iorfile; + +exit $status; diff --git a/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl new file mode 100755 index 00000000000..26b7edf2c14 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/NodeApplicationTest/run_test_simple.pl @@ -0,0 +1,47 @@ +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; + +$status = 0; +$iorfile = PerlACE::LocalFile ("test.ior"); + +for ($iter = 0; $iter <= $#ARGV; $iter++) { + if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { + print "Run_Test Perl script for NodeApplicationTest \n\n"; + print "run_test \n"; + print "\n"; + print "-h -- prints this information\n"; + exit 0; + } +} + + +unlink $iorfile; +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeApplication/NodeApplication", + "-n -o $iorfile"); + +$CL = new PerlACE::Process ("client_simple", + "-k file://$iorfile "); + +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); + exit 1; +} + +$CL->SpawnWaitKill (10); +$server = $SV->Kill (); + +unlink $iorfile; + +exit $status; diff --git a/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl b/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl new file mode 100755 index 00000000000..74b4ad3dfd3 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicNodeDaemon.pl @@ -0,0 +1,57 @@ +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; + +$status = 0; +$iorfile1 = PerlACE::LocalFile ("NodeApp1.ior"); +$iorfile2 = PerlACE::LocalFile ("NodeApp2.ior"); +$iorfile3 = PerlACE::LocalFile ("NodeApp3.ior"); +$iorfile4 = PerlACE::LocalFile ("NodeApp4.ior"); +$iorfile5 = PerlACE::LocalFile ("NodeApp5.ior"); + +#for ($iter = 0; $iter <= $#ARGV; $iter++) { +# if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { +# print "Run_Test Perl script for NodeApplicationTest \n\n"; +# print "run_test \n"; +# print "\n"; +# print "-h -- prints this information\n"; +# exit 0; +# } +#} + + +unlink $iorfile1; +unlink $iorfile2; +unlink $iorfile3; +unlink $iorfile4; +unlink $iorfile5; + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV1 = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeManager/Node_Daemon", + "-ORBEndpoint iiop://localhost:10000 -s $CIAO_ROOT/DnC/NodeApplication/NodeApplication"); + +$SV2 = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeManager/Node_Daemon", + "-ORBEndpoint iiop://localhost:20000 -s $CIAO_ROOT/DnC/NodeApplication/NodeApplication"); + +$SV3 = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeManager/Node_Daemon", + "-ORBEndpoint iiop://localhost:30000 -s $CIAO_ROOT/DnC/NodeApplication/NodeApplication"); + +$SV4 = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeManager/Node_Daemon", + "-ORBEndpoint iiop://localhost:40000 -s $CIAO_ROOT/DnC/NodeApplication/NodeApplication"); + +$SV5 = new PerlACE::Process ("$CIAO_ROOT/DnC/NodeManager/Node_Daemon", + "-ORBEndpoint iiop://localhost:50000 -s $CIAO_ROOT/DnC/NodeApplication/NodeApplication"); +$SV1->Spawn (); +$SV2->Spawn (); +$SV3->Spawn (); +$SV4->Spawn (); +$SV5->Spawn (); + +sleep (99999999999); diff --git a/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat b/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat new file mode 100644 index 00000000000..8bd5e6a72f6 --- /dev/null +++ b/TAO/CIAO/DAnCE/tests/scripts/BasicSP/basicsp.dat @@ -0,0 +1,3 @@ +BMClosedED corbaloc:iiop:localhost:10000/NodeManager +EC corbaloc:iiop:localhost:20000/NodeManager + |