From 1c499a46b3abddc92253569eb1a90a9e4d9a6d9d Mon Sep 17 00:00:00 2001 From: msmit Date: Tue, 19 Oct 2010 12:37:04 +0000 Subject: Tue Oct 19 12:40:36 UTC 2010 Marcel Smit * bin/ciao_tests.lst: * connectors/dds4ccm/tests/MemLeakDetection/*: Added two test which are especially there to test for memory leaks. --- .../Base/Event_MemLeakDetection_Test_Base.idl | 20 + .../Base/Event_MemLeakDetection_Test_Base.mpc | 26 + .../Event_MemLeakDetection_Test_Connector.idl | 20 + .../Event_MemLeakDetection_Test_Connector.mpc | 144 ++++ .../Event_MemLeakDetection_Test_Receiver.idl | 23 + .../Event_MemLeakDetection_Test_Receiver.mpc | 139 ++++ .../Sender/Event_MemLeakDetection_Test_Sender.idl | 23 + .../Sender/Event_MemLeakDetection_Test_Sender.mpc | 140 ++++ .../descriptors/All.cdp | 549 ++++++++++++++++ .../descriptors/Connector_only.cdp | 98 +++ .../descriptors/One_Connection.cdp | 194 ++++++ .../descriptors/Receiver_only.cdp | 88 +++ .../descriptors/Sender_only.cdp | 87 +++ .../descriptors/run_test.pl | 217 +++++++ .../Base/State_MemLeakDetection_Test_Base.idl | 23 + .../Base/State_MemLeakDetection_Test_Base.mpc | 26 + .../State_MemLeakDetection_Test_Connector.idl | 23 + .../State_MemLeakDetection_Test_Connector.mpc | 144 ++++ .../State_MemLeakDetection_Test_Receiver.idl | 24 + .../State_MemLeakDetection_Test_Receiver.mpc | 139 ++++ .../Sender/State_MemLeakDetection_Test_Sender.idl | 23 + .../Sender/State_MemLeakDetection_Test_Sender.mpc | 140 ++++ .../descriptors/All.cdp | 721 +++++++++++++++++++++ .../descriptors/Connector_only.cdp | 98 +++ .../descriptors/One_Connection.cdp | 196 ++++++ .../descriptors/Receiver_only.cdp | 88 +++ .../descriptors/Sender_only.cdp | 87 +++ .../descriptors/run_test.pl | 217 +++++++ 28 files changed, 3717 insertions(+) create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/All.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Connector_only.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/One_Connection.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Receiver_only.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Sender_only.cdp create mode 100755 CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/run_test.pl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.idl create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.mpc create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/All.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Connector_only.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/One_Connection.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Receiver_only.cdp create mode 100644 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Sender_only.cdp create mode 100755 CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/run_test.pl (limited to 'CIAO/connectors/dds4ccm/tests/MemLeakDetection') diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.idl new file mode 100644 index 00000000000..89cde6e7bcb --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.idl @@ -0,0 +1,20 @@ +// $Id$ + +/** + * @file Event_MemLeakDetection_Test_Base.idl + * @author Marcel Smit + */ + +#ifndef EVENT_MEMLEAKDETECTION_TEST_BASE_IDL +#define EVENT_MEMLEAKDETECTION_TEST_BASE_IDL + +#pragma ndds typesupport "Base/Event_MemLeakDetection_Test_BaseSupport.h" + +struct Event_MemLeakDetectionTest { + string key; //@key + long iteration; +}; + +typedef sequence Event_MemLeakDetectionTestSeq; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.mpc new file mode 100644 index 00000000000..3e7ed41408c --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Base/Event_MemLeakDetection_Test_Base.mpc @@ -0,0 +1,26 @@ +// $Id$ + +project (DDS_EMLDT_Base_stub) : taoidldefaults, dds4ccm_ts_default { + sharedname = DDS_EMLDT_Base_stub + dynamicflags += EVENT_MEMLEAKDETECTION_TEST_BASE_STUB_BUILD_DLL + libout = ../lib + + idlflags += -SS -Sci \ + -Wb,stub_export_macro=EVENT_MEMLEAKDETECTION_TEST_BASE_STUB_Export \ + -Wb,stub_export_include=Event_MemLeakDetection_Test_Base_stub_export.h + + IDL_Files { + idlflags += -Gxhst + Event_MemLeakDetection_Test_Base.idl + } + + opendds_ts_flags += --export=EVENT_MEMLEAKDETECTION_TEST_BASE_STUB_Export + + DDSGenerator_Files { + Event_MemLeakDetection_Test_Base.idl + } + + Source_Files { + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.idl new file mode 100644 index 00000000000..384fbc64062 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.idl @@ -0,0 +1,20 @@ +// $Id$ + +/** + * @file Event_MemLeakDetection_Test_Connector.idl + * @author Marcel Smit + */ + +#ifndef KEYED_TEST_CONNECTOR_IDL_ +#define KEYED_TEST_CONNECTOR_IDL_ + +#include +#include + +#include "Base/Event_MemLeakDetection_Test_Base.idl" + +#pragma ciao lem "Connector/Event_MemLeakDetection_Test_ConnectorE.idl" + +module ::CCM_DDS::Typed < ::Event_MemLeakDetectionTest, ::Event_MemLeakDetectionTestSeq> Event_MemLeakDetectionConnector; + +#endif /* Event_MemLeakDetection_Test_CONNECTOR_IDL_ */ diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.mpc new file mode 100644 index 00000000000..d2bd2ffc114 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Connector/Event_MemLeakDetection_Test_Connector.mpc @@ -0,0 +1,144 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_EMLDT_Base -l .. -o ../lib -u DDS Event_MemLeakDetection_Test_Connector" + +project(DDS_EMLDT_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=EVENT_MEMLEAKDETECTION_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=Event_MemLeakDetection_Test_Connector_stub_export.h \ + -Wb,skel_export_macro=EVENT_MEMLEAKDETECTION_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=Event_MemLeakDetection_Test_Connector_svnt_export.h \ + -Wb,svnt_export_macro=EVENT_MEMLEAKDETECTION_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=Event_MemLeakDetection_Test_Connector_svnt_export.h \ + -Wb,conn_export_macro=EVENT_MEMLEAKDETECTION_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=Event_MemLeakDetection_Test_Connector_conn_export.h \ + -I .. + + IDL_Files { + Event_MemLeakDetection_Test_Connector.idl + } +} + +project(DDS_EMLDT_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_EMLDT_Connector_idl_gen + idlflags += -Wb,stub_export_macro=EVENT_MEMLEAKDETECTION_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=Event_MemLeakDetection_Test_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + Event_MemLeakDetection_Test_ConnectorE.idl + } +} + +project(DDS_EMLDT_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { + after += DDS_EMLDT_Connector_lem_gen DDS_EMLDT_Connector_stub DDS_EMLDT_Base_stub + libs += DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_EMLDT_Connector_lem_stub + dynamicflags += EVENT_MEMLEAKDETECTION_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ConnectorEC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ConnectorEC.h + Event_MemLeakDetection_Test_Connector_lem_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ConnectorEC.inl + } +} + +project(DDS_EMLDT_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_EMLDT_Connector_idl_gen DDS_EMLDT_Base_stub + libs += DDS_EMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_EMLDT_Connector_stub + dynamicflags += EVENT_MEMLEAKDETECTION_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ConnectorC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ConnectorC.h + Event_MemLeakDetection_Test_Connector_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ConnectorC.inl + } +} + +project(DDS_EMLDT_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_EMLDT_Connector_lem_stub DDS_EMLDT_Connector_stub + sharedname = DDS_EMLDT_Connector_exec + libs += DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_lem_stub DDS_EMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += EVENT_MEMLEAKDETECTION_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_Connector_conn.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_Connector_conn.h + Event_MemLeakDetection_Test_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_EMLDT_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_EMLDT_Connector_lem_stub DDS_EMLDT_Connector_exec DDS_EMLDT_Connector_stub + sharedname = DDS_EMLDT_Connector_svnt + libs += DDS_EMLDT_Connector_stub \ + DDS_EMLDT_Connector_lem_stub \ + DDS_EMLDT_Base_stub \ + DDS_EMLDT_Connector_exec + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += EVENT_MEMLEAKDETECTION_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ConnectorS.cpp + Event_MemLeakDetection_Test_Connector_svnt.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ConnectorS.h + Event_MemLeakDetection_Test_Connector_svnt.h + Event_MemLeakDetection_Test_Connector_svnt_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ConnectorS.inl + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.idl new file mode 100644 index 00000000000..38d66d8efab --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.idl @@ -0,0 +1,23 @@ +// $Id$ + +/** + * @file + * @author Marcel Smit + */ + +#ifndef RECEIVER_IDL +#define RECEIVER_IDL + +#include "Connector/Event_MemLeakDetection_Test_Connector.idl" + +module Event_MemLeakDetection_Test +{ + component Receiver + { + port Event_MemLeakDetectionConnector::DDS_Listen info_listen; + port Event_MemLeakDetectionConnector::DDS_Get info_get; + provides CCM_DDS::ConnectorStatusListener status_listener; + }; +}; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.mpc new file mode 100644 index 00000000000..008010b555d --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Receiver/Event_MemLeakDetection_Test_Receiver.mpc @@ -0,0 +1,139 @@ +// $Id$ + +project(DDS_EMLDT_Receiver_idl_gen) : componentidldefaults, dds4ccm { + custom_only = 1 + after += DDS_EMLDT_Connector_idl_gen + idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \ + -Wb,stub_export_include=Receiver_stub_export.h \ + -Wb,skel_export_macro=RECEIVER_SVNT_Export \ + -Wb,skel_export_include=Receiver_svnt_export.h \ + -Wb,svnt_export_macro=RECEIVER_SVNT_Export \ + -Wb,svnt_export_include=Receiver_svnt_export.h \ + -Wb,exec_export_macro=RECEIVER_EXEC_Export \ + -Wb,exec_export_include=Receiver_exec_export.h \ + -I.. -Gex + + IDL_Files { + Event_MemLeakDetection_Test_Receiver.idl + } +} + +project(DDS_EMLDT_Receiver_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_EMLDT_Receiver_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \ + -Wb,stub_export_include=Receiver_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + Event_MemLeakDetection_Test_ReceiverE.idl + } +} + +project(DDS_EMLDT_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_EMLDT_Receiver_lem_gen DDS_EMLDT_Receiver_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Base_stub + libs += Receiver_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_lem_stub + dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ReceiverEC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ReceiverEC.h + Receiver_lem_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ReceiverEC.inl + } +} + +project(DDS_EMLDT_Receiver_stub) : ccm_stub, dds4ccm_base { + after += DDS_EMLDT_Receiver_idl_gen DDS_EMLDT_Connector_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_lem_gen + libs += DDS_EMLDT_Connector_stub DDS_EMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_stub + dynamicflags += RECEIVER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ReceiverC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ReceiverC.h + Receiver_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ReceiverC.inl + } +} + +project(DDS_EMLDT_Receiver_exec) : ciao_executor, dds4ccm_lem_stub { + after += DDS_EMLDT_Receiver_lem_stub DDS_EMLDT_Receiver_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_lem_stub + sharedname = Receiver_exec + libs += Receiver_stub Receiver_lem_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += RECEIVER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_Receiver_exec.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_Receiver_exec.h + Receiver_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_EMLDT_Receiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { + after += DDS_EMLDT_Receiver_lem_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_svnt DDS_EMLDT_Receiver_exec DDS_EMLDT_Connector_lem_stub + sharedname = Receiver_svnt + libs += Receiver_stub Receiver_lem_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_svnt Receiver_exec DDS_EMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += RECEIVER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_ReceiverS.cpp + Event_MemLeakDetection_Test_Receiver_svnt.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_ReceiverS.h + Event_MemLeakDetection_Test_Receiver_svnt.h + Receiver_svnt_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_ReceiverS.inl + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.idl new file mode 100644 index 00000000000..dd3e3c9733f --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.idl @@ -0,0 +1,23 @@ +// $Id$ + +/** + * @file + * @author Marcel Smit + * + * by-hand idl3 translation of sender components. + */ + +#ifndef DDS_EVENT_MEMLEAKDETECTION_TEST_SENDER_IDL +#define DDS_EVENT_MEMLEAKDETECTION_TEST_SENDER_IDL + +#include "Connector/Event_MemLeakDetection_Test_Connector.idl" + +module Event_MemLeakDetection_Test +{ + component Sender + { + port Event_MemLeakDetectionConnector::DDS_Write info_write; + }; +}; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.mpc new file mode 100644 index 00000000000..84aa30d7b4d --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/Sender/Event_MemLeakDetection_Test_Sender.mpc @@ -0,0 +1,140 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_EMLDT_Base -l ../lib -o ../lib -c controller -u DDS Sender" + +project(DDS_EMLDT_Sender_idl_gen) : componentidldefaults, dds4ccm { + after += DDS_EMLDT_Connector_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \ + -Wb,stub_export_include=Sender_stub_export.h \ + -Wb,skel_export_macro=SENDER_SVNT_Export \ + -Wb,skel_export_include=Sender_svnt_export.h \ + -Wb,svnt_export_macro=SENDER_SVNT_Export \ + -Wb,svnt_export_include=Sender_svnt_export.h \ + -Wb,exec_export_macro=SENDER_EXEC_Export \ + -Wb,exec_export_include=Sender_exec_export.h \ + -I .. -Gex + + IDL_Files { + Event_MemLeakDetection_Test_Sender.idl + } +} + +project(DDS_EMLDT_Sender_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_EMLDT_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=Sender_lem_stub_export.h \ + -SS -Gxhst -I $CIAO_ROOT/connectors -I .. + + IDL_Files { + Event_MemLeakDetection_Test_SenderE.idl + } +} + +project(DDS_EMLDT_Sender_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_EMLDT_Sender_lem_gen DDS_EMLDT_Sender_stub DDS_EMLDT_Base_stub + libs += DDS_EMLDT_Base_stub Sender_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Sender_lem_stub + dynamicflags += SENDER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_SenderEC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_SenderEC.h + Sender_lem_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_SenderEC.inl + } +} + +project(DDS_EMLDT_Sender_stub) : ccm_stub, dds4ccm_base { + after += DDS_EMLDT_Sender_idl_gen DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub + libs += DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub + includes += .. + libpaths += ../lib + libout = ../lib + sharedname = Sender_stub + dynamicflags += SENDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_SenderC.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_SenderC.h + Sender_stub_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_SenderC.inl + } +} + +project(DDS_EMLDT_Sender_exec) : ciao_executor, dds4ccm_base { + after += DDS_EMLDT_Sender_lem_stub DDS_EMLDT_Sender_stub DDS_EMLDT_Connector_lem_stub DDS_EMLDT_Connector_stub + sharedname = Sender_exec + libs += Sender_stub Sender_lem_stub DDS_EMLDT_Base_stub DDS_EMLDT_Connector_lem_stub DDS_EMLDT_Connector_stub + libpaths += ../lib + includes += .. + libout = ../lib + dynamicflags += SENDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_Sender_exec.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_Sender_exec.h + Sender_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_EMLDT_Sender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { + after += DDS_EMLDT_Base_stub DDS_EMLDT_Sender_lem_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_svnt DDS_EMLDT_Connector_lem_stub + sharedname = Sender_svnt + libs += Sender_stub Sender_lem_stub \ + DDS_EMLDT_Base_stub DDS_EMLDT_Connector_stub DDS_EMLDT_Connector_svnt DDS_EMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += SENDER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event_MemLeakDetection_Test_SenderS.cpp + Event_MemLeakDetection_Test_Sender_svnt.cpp + } + + Header_Files { + Event_MemLeakDetection_Test_SenderS.h + Event_MemLeakDetection_Test_Sender_svnt.h + Sender_svnt_export.h + } + + Inline_Files { + Event_MemLeakDetection_Test_SenderS.inl + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/All.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/All.cdp new file mode 100644 index 00000000000..8f1724ee3a6 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/All.cdp @@ -0,0 +1,549 @@ + + + + Event_MemLeakDetection_Test_Depl_1 + + + ReceiverComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetection_Test_Receiver_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetection_Test_Receiver_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Receiver_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Receiver_exec + + + + + + + Event_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_exec + + + + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + ReceiverComponent + ReceiverNode + + + + + + Event_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + Event_MemLeakDetection_Test + + + + + + Event_MemLeakDetection_Test_ConnectorComponent2 + ReceiverNode + + + + + topic_name + + + tk_string + + + Event_MemLeakDetection_Test + + + + + + SenderComponent + SenderNode + + + + + + + listen_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data + false + SimplexReceptacle + + + + push_consumer_data + true + Facet + + + + + + listen_portstatuslistener + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_status + true + Facet + + + + push_consumer_status + false + SimplexReceptacle + + + + + + listen_rawlistener + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data_listener + true + Facet + + + + push_consumer_data_listener + false + SimplexReceptacle + + + + + + listen_datacontrol + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data_control + false + SimplexReceptacle + + + + push_consumer_data_control + true + Facet + + + + + + listen_dds_reader + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_dds_entity + false + SimplexReceptacle + + + + push_consumer_dds_entity + true + Facet + + + + + + listen_filter_config + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_filter_config + false + SimplexReceptacle + + + + push_consumer_filter_config + true + Facet + + + + + + getter_portstatuslistener + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_status + true + Facet + + + + pull_consumer_status + false + SimplexReceptacle + + + + + + getter_fresh_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_fresh_data + false + SimplexReceptacle + + + + pull_consumer_fresh_data + true + Facet + + + + + + getter_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_data + false + SimplexReceptacle + + + + pull_consumer_data + true + Facet + + + + + + getter_dds_reader + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_dds_entity + false + SimplexReceptacle + + + + pull_consumer_dds_entity + true + Facet + + + + + + getter_filter_config + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_filter_config + false + SimplexReceptacle + + + + pull_consumer_filter_config + true + Facet + + + + + + connector_status_listener + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + status_listener + true + Facet + + + + error_listener + false + SimplexReceptacle + + + + + + writer_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_write_data + false + SimplexReceptacle + + + + supplier_data + true + Facet + + + + + + writer_dds_writer + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_write_dds_entity + false + SimplexReceptacle + + + + supplier_dds_entity + true + Facet + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + + Event_MemLeakDetection_Test_Connector_exec + + + DDS_EMLDT_Connector_exec + + + Event_MemLeakDetection_Test_Connector_svnt + + + DDS_EMLDT_Connector_svnt + + + Event_MemLeakDetection_Test_Connector_stub + + + DDS_EMLDT_Connector_stub + + + Receiver_exec + + + Receiver_exec + + + Receiver_svnt + + + Receiver_svnt + + + Receiver_stub + + + Receiver_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Connector_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Connector_only.cdp new file mode 100644 index 00000000000..bca4e8853f5 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Connector_only.cdp @@ -0,0 +1,98 @@ + + + + Event_MemLeakDetection_Test_Depl_1 + + + Event_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_exec + + + + + + Event_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + Event_MemLeakDetection_Test + + + + + + + Event_MemLeakDetection_Test_Connector_exec + + + DDS_EMLDT_Connector_exec + + + Event_MemLeakDetection_Test_Connector_svnt + + + DDS_EMLDT_Connector_svnt + + + Event_MemLeakDetection_Test_Connector_stub + + + DDS_EMLDT_Connector_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/One_Connection.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/One_Connection.cdp new file mode 100644 index 00000000000..6a113a393fd --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/One_Connection.cdp @@ -0,0 +1,194 @@ + + + + Event_MemLeakDetection_Test_Depl_1 + + + Event_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetectionConnector_DDS_Event_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Event_MemLeakDetection_Test_Connector_exec + + + + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + Event_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + Event_MemLeakDetection_Test + + + + + + SenderComponent + SenderNode + + + + + + + writer_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_write_data + false + SimplexReceptacle + + + + supplier_data + true + Facet + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + + Event_MemLeakDetection_Test_Connector_exec + + + DDS_EMLDT_Connector_exec + + + Event_MemLeakDetection_Test_Connector_svnt + + + DDS_EMLDT_Connector_svnt + + + Event_MemLeakDetection_Test_Connector_stub + + + DDS_EMLDT_Connector_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Receiver_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Receiver_only.cdp new file mode 100644 index 00000000000..db1e72cc552 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Receiver_only.cdp @@ -0,0 +1,88 @@ + + + + Event_MemLeakDetection_Test_Depl_1 + + + ReceiverComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetection_Test_Receiver_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetection_Test_Receiver_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Receiver_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Receiver_exec + + + + + + + ReceiverComponent + ReceiverNode + + + + + + + Receiver_exec + + + Receiver_exec + + + Receiver_svnt + + + Receiver_svnt + + + Receiver_stub + + + Receiver_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Sender_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Sender_only.cdp new file mode 100644 index 00000000000..69e62a68805 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/Sender_only.cdp @@ -0,0 +1,87 @@ + + + + Event_MemLeakDetection_Test_Depl_1 + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Event_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + SenderComponent + SenderNode + + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/run_test.pl new file mode 100755 index 00000000000..65ce06f9e91 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/Event_MemLeakDetection_Test/descriptors/run_test.pl @@ -0,0 +1,217 @@ +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::TestTarget; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 2; +@ports = ( 60001, 60002 ); +@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" ); +@iorfiles = 0; +@nodenames = ( "SenderNode", "ReceiverNode" ); + +# ior files other than daemon +$ior_nsbase = "ns.ior"; +$ior_nsfile = 0; +$ior_embase = "EM.ior"; +$ior_emfile = 0; + +# Processes +$E = 0; +$EM = 0; +$NS = 0; +@DEAMONS = 0; + +# targets +@tg_daemons = 0; +$tg_naming = 0; +$tg_exe_man = 0; +$tg_executor = 0; + +$status = 0; + +sub create_targets { + # naming service + $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + $tg_naming->AddLibPath ('../lib'); + # daemon + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for deamon $i failed\n"; + $tg_daemons[$i]->AddLibPath ('../lib'); + } + # execution manager + $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + $tg_exe_man->AddLibPath ('../lib'); + # executor (plan_launcher) + $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; + $tg_executor->AddLibPath ('../lib'); +} + +sub init_ior_files { + $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); + $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } + delete_ior_files (); +} + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i]->DeleteFile ($iorbases[$i]); + } + $tg_naming->DeleteFile ($ior_nsbase); + $tg_exe_man->DeleteFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } +} + +sub kill_node_daemon { + for ($i = 0; $i < $nr_daemon; ++$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemon (); + } + + if ($em_running == 1) { + $EM->Kill (); $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); $NS->TimedWait (1); + } + # in case shutdown did not perform as expected + $tg_executor->KillAll ('dance_locality_manager'); +} + + +sub run_node_daemons { + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run node daemon\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + 2 * $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +if ($#ARGV == -1) { + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} +else { + @files = @ARGV; +} + +create_targets (); +init_ior_files (); + +foreach $file (@files) { + print "*********** Starting test for deployment $file ***********\n"; + + print STDERR "Starting Naming Service\n"; + + $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + $NS->Spawn (); + + if ($tg_naming->WaitForFileTimed ($ior_nsbase, + 2 * $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; + } + + $ns_running = 1; + # Set up NamingService environment + $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + # Invoke node daemon. + print "Invoking node daemon\n"; + $status = run_node_daemons (); + + if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; + } + + $daemons_running = 1; + + # Invoke execution manager. + print "Invoking execution manager\n"; + $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); + $EM->Spawn (); + + if ($tg_exe_man->WaitForFileTimed ($ior_embase, + 2 * $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; + } + + $em_running = 1; + + # Invoke executor - start the application -. + print "Invoking executor - launch the application -\n"; + $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $file -k file://$ior_emfile"); + $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ()); + + print "Sleeping 5 seconds to allow task to complete\n"; + sleep (5); + + print "Teardown the application\n"; + $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-k file://$ior_emfile -x $file -s"); + $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ()); + print "Executor finished.\n"; + + delete_ior_files (); + kill_open_processes (); +} + +delete_ior_files (); +kill_open_processes (); + +exit $status; diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.idl new file mode 100644 index 00000000000..f0d431b7576 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.idl @@ -0,0 +1,23 @@ +// $Id$ + +/** + * @file State_MemLeakDetection_Test_Base.idl + * @author Marcel Smit + */ + +#ifndef STATE_MEMLEAKDETECTION_TEST_BASE_IDL +#define STATE_MEMLEAKDETECTION_TEST_BASE_IDL + +#pragma ndds typesupport "Base/State_MemLeakDetection_Test_BaseSupport.h" + +#pragma DCPS_DATA_TYPE "State_MemLeakDetectionTest" +#pragma DCPS_DATA_KEY "State_MemLeakDetectionTest key" + +struct State_MemLeakDetectionTest { + string key; //@key + long iteration; +}; + +typedef sequence State_MemLeakDetectionTestSeq; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.mpc new file mode 100644 index 00000000000..2fb0c7e095f --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Base/State_MemLeakDetection_Test_Base.mpc @@ -0,0 +1,26 @@ +// $Id$ + +project (DDS_SMLDT_Base_stub) : taoidldefaults, dds4ccm_ts_default { + sharedname = DDS_SMLDT_Base_stub + dynamicflags += STATE_MEMLEAKDETECTION_TEST_BASE_STUB_BUILD_DLL + libout = ../lib + + idlflags += -SS -Sci \ + -Wb,stub_export_macro=STATE_MEMLEAKDETECTION_TEST_BASE_STUB_Export \ + -Wb,stub_export_include=State_MemLeakDetection_Test_Base_stub_export.h + + IDL_Files { + idlflags += -Gxhst + State_MemLeakDetection_Test_Base.idl + } + + opendds_ts_flags += --export=STATE_MEMLEAKDETECTION_TEST_BASE_STUB_Export + + DDSGenerator_Files { + State_MemLeakDetection_Test_Base.idl + } + + Source_Files { + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.idl new file mode 100644 index 00000000000..2929795616a --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.idl @@ -0,0 +1,23 @@ +// $Id$ + +/** + * @file State_MemLeakDetection_Test_Connector.idl + * @author Marcel Smit + */ + +#ifndef KEYED_TEST_CONNECTOR_IDL_ +#define KEYED_TEST_CONNECTOR_IDL_ + +#include +#include + +#include "Base/State_MemLeakDetection_Test_Base.idl" + +#pragma ciao lem "Connector/State_MemLeakDetection_Test_ConnectorE.idl" + +module State_MemLeakDetection_Test +{ + module ::CCM_DDS::Typed < ::State_MemLeakDetectionTest, ::State_MemLeakDetectionTestSeq> State_MemLeakDetectionTestConnector; +}; + +#endif /* STATE_MEMLEAKDETECTION_TEST_CONNECTOR_IDL_ */ diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.mpc new file mode 100644 index 00000000000..3e4eaedc370 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Connector/State_MemLeakDetection_Test_Connector.mpc @@ -0,0 +1,144 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_SMLDT_Base -l .. -o ../lib -u DDS State_MemLeakDetection_Test_Connector" + +project(DDS_SMLDT_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=STATE_MEMLEAKDETECTION_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=State_MemLeakDetection_Test_Connector_stub_export.h \ + -Wb,skel_export_macro=STATE_MEMLEAKDETECTION_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=State_MemLeakDetection_Test_Connector_svnt_export.h \ + -Wb,svnt_export_macro=STATE_MEMLEAKDETECTION_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=State_MemLeakDetection_Test_Connector_svnt_export.h \ + -Wb,conn_export_macro=STATE_MEMLEAKDETECTION_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=State_MemLeakDetection_Test_Connector_conn_export.h \ + -I .. + + IDL_Files { + State_MemLeakDetection_Test_Connector.idl + } +} + +project(DDS_SMLDT_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += DDS_SMLDT_Connector_idl_gen + idlflags += -Wb,stub_export_macro=STATE_MEMLEAKDETECTION_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=State_MemLeakDetection_Test_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + State_MemLeakDetection_Test_ConnectorE.idl + } +} + +project(DDS_SMLDT_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { + after += DDS_SMLDT_Connector_lem_gen DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub + libs += DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_SMLDT_Connector_lem_stub + dynamicflags += STATE_MEMLEAKDETECTION_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ConnectorEC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ConnectorEC.h + State_MemLeakDetection_Test_Connector_lem_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ConnectorEC.inl + } +} + +project(DDS_SMLDT_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_SMLDT_Connector_idl_gen DDS_SMLDT_Base_stub + libs += DDS_SMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = DDS_SMLDT_Connector_stub + dynamicflags += STATE_MEMLEAKDETECTION_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ConnectorC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ConnectorC.h + State_MemLeakDetection_Test_Connector_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ConnectorC.inl + } +} + +project(DDS_SMLDT_Connector_exec) : ciao_executor, dds4ccm_impl { + after += DDS_SMLDT_Connector_lem_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub + sharedname = DDS_SMLDT_Connector_exec + libs += DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_lem_stub DDS_SMLDT_Base_stub DDS_SMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += STATE_MEMLEAKDETECTION_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_Connector_conn.cpp + } + + Header_Files { + State_MemLeakDetection_Test_Connector_conn.h + State_MemLeakDetection_Test_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(DDS_SMLDT_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += DDS_SMLDT_Connector_lem_stub DDS_SMLDT_Connector_exec DDS_SMLDT_Connector_stub + sharedname = DDS_SMLDT_Connector_svnt + libs += DDS_SMLDT_Connector_stub \ + DDS_SMLDT_Connector_lem_stub \ + DDS_SMLDT_Base_stub \ + DDS_SMLDT_Connector_exec + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += STATE_MEMLEAKDETECTION_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ConnectorS.cpp + State_MemLeakDetection_Test_Connector_svnt.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ConnectorS.h + State_MemLeakDetection_Test_Connector_svnt.h + State_MemLeakDetection_Test_Connector_svnt_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ConnectorS.inl + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.idl new file mode 100644 index 00000000000..808810effb8 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.idl @@ -0,0 +1,24 @@ +// $Id$ + +/** + * @file + * @author Marcel Smit + */ + +#ifndef RECEIVER_IDL +#define RECEIVER_IDL + +#include "Connector/State_MemLeakDetection_Test_Connector.idl" + +module State_MemLeakDetection_Test +{ + component Receiver + { + port State_MemLeakDetectionTestConnector::DDS_Read info_read; + port State_MemLeakDetectionTestConnector::DDS_Get info_get; + port State_MemLeakDetectionTestConnector::DDS_Listen info_listen; + port State_MemLeakDetectionTestConnector::DDS_StateListen info_statelisten; + }; +}; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.mpc new file mode 100644 index 00000000000..67a9f79aa96 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Receiver/State_MemLeakDetection_Test_Receiver.mpc @@ -0,0 +1,139 @@ +// $Id$ + +project(DDS_SMLDT_Receiver_idl_gen) : componentidldefaults, dds4ccm { + custom_only = 1 + after += DDS_SMLDT_Connector_idl_gen + idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \ + -Wb,stub_export_include=Receiver_stub_export.h \ + -Wb,skel_export_macro=RECEIVER_SVNT_Export \ + -Wb,skel_export_include=Receiver_svnt_export.h \ + -Wb,svnt_export_macro=RECEIVER_SVNT_Export \ + -Wb,svnt_export_include=Receiver_svnt_export.h \ + -Wb,exec_export_macro=RECEIVER_EXEC_Export \ + -Wb,exec_export_include=Receiver_exec_export.h \ + -I.. -Gex + + IDL_Files { + State_MemLeakDetection_Test_Receiver.idl + } +} + +project(DDS_SMLDT_Receiver_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_SMLDT_Receiver_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \ + -Wb,stub_export_include=Receiver_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + State_MemLeakDetection_Test_ReceiverE.idl + } +} + +project(DDS_SMLDT_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_SMLDT_Receiver_lem_gen DDS_SMLDT_Receiver_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub + libs += Receiver_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_lem_stub + dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ReceiverEC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ReceiverEC.h + Receiver_lem_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ReceiverEC.inl + } +} + +project(DDS_SMLDT_Receiver_stub) : ccm_stub, dds4ccm_base { + after += DDS_SMLDT_Receiver_idl_gen DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_lem_gen + libs += DDS_SMLDT_Connector_stub DDS_SMLDT_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_stub + dynamicflags += RECEIVER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ReceiverC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ReceiverC.h + Receiver_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ReceiverC.inl + } +} + +project(DDS_SMLDT_Receiver_exec) : ciao_executor, dds4ccm_lem_stub { + after += DDS_SMLDT_Receiver_lem_stub DDS_SMLDT_Receiver_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_lem_stub + sharedname = Receiver_exec + libs += Receiver_stub Receiver_lem_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += RECEIVER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_Receiver_exec.cpp + } + + Header_Files { + State_MemLeakDetection_Test_Receiver_exec.h + Receiver_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_SMLDT_Receiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { + after += DDS_SMLDT_Receiver_lem_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_svnt DDS_SMLDT_Receiver_exec DDS_SMLDT_Connector_lem_stub + sharedname = Receiver_svnt + libs += Receiver_stub Receiver_lem_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_svnt Receiver_exec DDS_SMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += RECEIVER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_ReceiverS.cpp + State_MemLeakDetection_Test_Receiver_svnt.cpp + } + + Header_Files { + State_MemLeakDetection_Test_ReceiverS.h + State_MemLeakDetection_Test_Receiver_svnt.h + Receiver_svnt_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_ReceiverS.inl + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.idl new file mode 100644 index 00000000000..30e3676a04d --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.idl @@ -0,0 +1,23 @@ +// $Id$ + +/** + * @file + * @author Marcel Smit + * + * by-hand idl3 translation of sender components. + */ + +#ifndef DDS_STATE_MEMLEAKDETECTION_TEST_SENDER_IDL +#define DDS_STATE_MEMLEAKDETECTION_TEST_SENDER_IDL + +#include "Connector/State_MemLeakDetection_Test_Connector.idl" + +module State_MemLeakDetection_Test +{ + component Sender + { + port State_MemLeakDetectionTestConnector::DDS_Update info_update; + }; +}; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.mpc b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.mpc new file mode 100644 index 00000000000..b4a7fc534c7 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/Sender/State_MemLeakDetection_Test_Sender.mpc @@ -0,0 +1,140 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_SMLDT_Base -l ../lib -o ../lib -c controller -u DDS Sender" + +project(DDS_SMLDT_Sender_idl_gen) : componentidldefaults, dds4ccm { + after += DDS_SMLDT_Connector_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \ + -Wb,stub_export_include=Sender_stub_export.h \ + -Wb,skel_export_macro=SENDER_SVNT_Export \ + -Wb,skel_export_include=Sender_svnt_export.h \ + -Wb,svnt_export_macro=SENDER_SVNT_Export \ + -Wb,svnt_export_include=Sender_svnt_export.h \ + -Wb,exec_export_macro=SENDER_EXEC_Export \ + -Wb,exec_export_include=Sender_exec_export.h \ + -I .. -Gex + + IDL_Files { + State_MemLeakDetection_Test_Sender.idl + } +} + +project(DDS_SMLDT_Sender_lem_gen) : ciaoidldefaults, dds4ccm { + after += DDS_SMLDT_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=Sender_lem_stub_export.h \ + -SS -Gxhst -I $CIAO_ROOT/connectors -I .. + + IDL_Files { + State_MemLeakDetection_Test_SenderE.idl + } +} + +project(DDS_SMLDT_Sender_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_SMLDT_Sender_lem_gen DDS_SMLDT_Sender_stub DDS_SMLDT_Base_stub + libs += DDS_SMLDT_Base_stub Sender_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Sender_lem_stub + dynamicflags += SENDER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_SenderEC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_SenderEC.h + Sender_lem_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_SenderEC.inl + } +} + +project(DDS_SMLDT_Sender_stub) : ccm_stub, dds4ccm_base { + after += DDS_SMLDT_Sender_idl_gen DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub + libs += DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub + includes += .. + libpaths += ../lib + libout = ../lib + sharedname = Sender_stub + dynamicflags += SENDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_SenderC.cpp + } + + Header_Files { + State_MemLeakDetection_Test_SenderC.h + Sender_stub_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_SenderC.inl + } +} + +project(DDS_SMLDT_Sender_exec) : ciao_executor, dds4ccm_base { + after += DDS_SMLDT_Sender_lem_stub DDS_SMLDT_Sender_stub DDS_SMLDT_Connector_lem_stub DDS_SMLDT_Connector_stub + sharedname = Sender_exec + libs += Sender_stub Sender_lem_stub DDS_SMLDT_Base_stub DDS_SMLDT_Connector_lem_stub DDS_SMLDT_Connector_stub + libpaths += ../lib + includes += .. + libout = ../lib + dynamicflags += SENDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_Sender_exec.cpp + } + + Header_Files { + State_MemLeakDetection_Test_Sender_exec.h + Sender_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_SMLDT_Sender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { + after += DDS_SMLDT_Base_stub DDS_SMLDT_Sender_lem_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_svnt DDS_SMLDT_Connector_lem_stub + sharedname = Sender_svnt + libs += Sender_stub Sender_lem_stub \ + DDS_SMLDT_Base_stub DDS_SMLDT_Connector_stub DDS_SMLDT_Connector_svnt DDS_SMLDT_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += SENDER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + State_MemLeakDetection_Test_SenderS.cpp + State_MemLeakDetection_Test_Sender_svnt.cpp + } + + Header_Files { + State_MemLeakDetection_Test_SenderS.h + State_MemLeakDetection_Test_Sender_svnt.h + Sender_svnt_export.h + } + + Inline_Files { + State_MemLeakDetection_Test_SenderS.inl + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/All.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/All.cdp new file mode 100644 index 00000000000..0d73de0c3e1 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/All.cdp @@ -0,0 +1,721 @@ + + + + State_MemLeakDetection_Test_Depl_1 + + + ReceiverComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_Receiver_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_Receiver_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Receiver_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Receiver_exec + + + + + + + State_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_exec + + + + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + ReceiverComponent + ReceiverNode + + + + + + State_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + State_MemLeakDetection_Test + + + + + + State_MemLeakDetection_Test_ConnectorComponent2 + ReceiverNode + + + + + topic_name + + + tk_string + + + State_MemLeakDetection_Test + + + + + + SenderComponent + SenderNode + + + + + + + + update_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_update_data + false + SimplexReceptacle + + + + observable_data + true + Facet + + + + + update_dds_entity + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_update_dds_entity + false + SimplexReceptacle + + + + observable_dds_entity + true + Facet + + + + + + + + get_data_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_data + false + SimplexReceptacle + + + + pull_observer_data + true + Facet + + + + + get_fresh_data_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_fresh_data + false + SimplexReceptacle + + + + pull_observer_fresh_data + true + Facet + + + + + get_dds_entity_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_dds_entity + false + SimplexReceptacle + + + + pull_observer_dds_entity + true + Facet + + + + + get_filter_config_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_filter_config + false + SimplexReceptacle + + + + pull_observer_filter_config + true + Facet + + + + + + get_status_mirrorport + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_get_status + true + Facet + + + + pull_observer_status + false + SimplexReceptacle + + + + + + + read_data_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_read_data + false + SimplexReceptacle + + + + passive_observer_data + true + Facet + + + + + read_dds_entity_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_read_dds_entity + false + SimplexReceptacle + + + + passive_observer_dds_entity + true + Facet + + + + + read_filter_config_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_read_filter_config + false + SimplexReceptacle + + + + passive_observer_filter_config + true + Facet + + + + + + read_status_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_read_status + true + Facet + + + + passive_observer_status + false + SimplexReceptacle + + + + + + + listen_data_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data + false + SimplexReceptacle + + + + push_observer_data + true + Facet + + + + + listen_data_control_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data_control + false + SimplexReceptacle + + + + push_observer_data_control + true + Facet + + + + + listen_dds_entity_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_dds_entity + false + SimplexReceptacle + + + + push_observer_dds_entity + true + Facet + + + + + listen_filter_config_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_filter_config + false + SimplexReceptacle + + + + push_observer_filter_config + true + Facet + + + + + + listen_data_listener_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_data_listener + true + Facet + + + + push_observer_data_listener + false + SimplexReceptacle + + + + + listen_status_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_listen_status + true + Facet + + + + push_observer_status + false + SimplexReceptacle + + + + + + + statelisten_data_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_data + false + SimplexReceptacle + + + + push_state_observer_data + true + Facet + + + + + statelisten_data_control_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_data_control + false + SimplexReceptacle + + + + push_state_observer_data_control + true + Facet + + + + + statelisten_dds_entity_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_dds_entity + false + SimplexReceptacle + + + + push_state_observer_dds_entity + true + Facet + + + + + statelisten_filter_config_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_filter_config + false + SimplexReceptacle + + + + push_state_observer_filter_config + true + Facet + + + + + + statelisten_data_listener_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_data_listener + true + Facet + + + + push_state_observer_data_listener + false + SimplexReceptacle + + + + + statelisten_status_port + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_statelisten_status + true + Facet + + + + push_state_observer_status + false + SimplexReceptacle + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + + State_MemLeakDetection_Test_Connector_exec + + + DDS_SMLDT_Connector_exec + + + State_MemLeakDetection_Test_Connector_svnt + + + DDS_SMLDT_Connector_svnt + + + State_MemLeakDetection_Test_Connector_stub + + + DDS_SMLDT_Connector_stub + + + Receiver_exec + + + Receiver_exec + + + Receiver_svnt + + + Receiver_svnt + + + Receiver_stub + + + Receiver_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Connector_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Connector_only.cdp new file mode 100644 index 00000000000..7551ffce6fe --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Connector_only.cdp @@ -0,0 +1,98 @@ + + + + State_MemLeakDetection_Test_Depl_1 + + + State_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_exec + + + + + + State_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + State_MemLeakDetection_Test + + + + + + + State_MemLeakDetection_Test_Connector_exec + + + DDS_SMLDT_Connector_exec + + + State_MemLeakDetection_Test_Connector_svnt + + + DDS_SMLDT_Connector_svnt + + + State_MemLeakDetection_Test_Connector_stub + + + DDS_SMLDT_Connector_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/One_Connection.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/One_Connection.cdp new file mode 100644 index 00000000000..a7a2b8c69a6 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/One_Connection.cdp @@ -0,0 +1,196 @@ + + + + State_MemLeakDetection_Test_Depl_1 + + + State_MemLeakDetection_Test_ConnectorComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_State_MemLeakDetectionTestConnector_DDS_State_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + State_MemLeakDetection_Test_Connector_exec + + + + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + + State_MemLeakDetection_Test_ConnectorComponent + SenderNode + + + + + topic_name + + + tk_string + + + State_MemLeakDetection_Test + + + + + + SenderComponent + SenderNode + + + + + + + + update_data + + edu.dre.vanderbilt.DAnCE.ConnectionType + Local_Interface + + + info_update_data + false + SimplexReceptacle + + + + observable_data + true + Facet + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + + State_MemLeakDetection_Test_Connector_exec + + + DDS_SMLDT_Connector_exec + + + State_MemLeakDetection_Test_Connector_svnt + + + DDS_SMLDT_Connector_svnt + + + State_MemLeakDetection_Test_Connector_stub + + + DDS_SMLDT_Connector_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Receiver_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Receiver_only.cdp new file mode 100644 index 00000000000..3e1d6d04ed9 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Receiver_only.cdp @@ -0,0 +1,88 @@ + + + + State_MemLeakDetection_Test_Depl_1 + + + ReceiverComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_Receiver_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_Receiver_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Receiver_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Receiver_exec + + + + + + + ReceiverComponent + ReceiverNode + + + + + + + Receiver_exec + + + Receiver_exec + + + Receiver_svnt + + + Receiver_svnt + + + Receiver_stub + + + Receiver_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Sender_only.cdp b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Sender_only.cdp new file mode 100644 index 00000000000..2272a5783c5 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/Sender_only.cdp @@ -0,0 +1,87 @@ + + + + State_MemLeakDetection_Test_Depl_1 + + + SenderComponentImplementation + + + + + + component factory + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_State_MemLeakDetection_Test_Sender_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Sender_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Sender_exec + + + + + + SenderComponent + SenderNode + + + + + + + Sender_exec + + + Sender_exec + + + Sender_svnt + + + Sender_svnt + + + Sender_stub + + + Sender_stub + + diff --git a/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/run_test.pl new file mode 100755 index 00000000000..65ce06f9e91 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/MemLeakDetection/State_MemLeakDetection_Test/descriptors/run_test.pl @@ -0,0 +1,217 @@ +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::TestTarget; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 2; +@ports = ( 60001, 60002 ); +@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" ); +@iorfiles = 0; +@nodenames = ( "SenderNode", "ReceiverNode" ); + +# ior files other than daemon +$ior_nsbase = "ns.ior"; +$ior_nsfile = 0; +$ior_embase = "EM.ior"; +$ior_emfile = 0; + +# Processes +$E = 0; +$EM = 0; +$NS = 0; +@DEAMONS = 0; + +# targets +@tg_daemons = 0; +$tg_naming = 0; +$tg_exe_man = 0; +$tg_executor = 0; + +$status = 0; + +sub create_targets { + # naming service + $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; + $tg_naming->AddLibPath ('../lib'); + # daemon + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for deamon $i failed\n"; + $tg_daemons[$i]->AddLibPath ('../lib'); + } + # execution manager + $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; + $tg_exe_man->AddLibPath ('../lib'); + # executor (plan_launcher) + $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; + $tg_executor->AddLibPath ('../lib'); +} + +sub init_ior_files { + $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); + $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } + delete_ior_files (); +} + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $nr_daemon; ++$i) { + $tg_daemons[$i]->DeleteFile ($iorbases[$i]); + } + $tg_naming->DeleteFile ($ior_nsbase); + $tg_exe_man->DeleteFile ($ior_embase); + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); + } +} + +sub kill_node_daemon { + for ($i = 0; $i < $nr_daemon; ++$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemon (); + } + + if ($em_running == 1) { + $EM->Kill (); $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); $NS->TimedWait (1); + } + # in case shutdown did not perform as expected + $tg_executor->KillAll ('dance_locality_manager'); +} + + +sub run_node_daemons { + for ($i = 0; $i < $nr_daemon; ++$i) { + $iorbase = $iorbases[$i]; + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager"; + + $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; + + print "Run node daemon\n"; + + $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); + $DEAMONS[$i]->Spawn (); + + if ($tg_daemons[$i]->WaitForFileTimed($iorbase, + 2 * $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +if ($#ARGV == -1) { + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} +else { + @files = @ARGV; +} + +create_targets (); +init_ior_files (); + +foreach $file (@files) { + print "*********** Starting test for deployment $file ***********\n"; + + print STDERR "Starting Naming Service\n"; + + $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + $NS->Spawn (); + + if ($tg_naming->WaitForFileTimed ($ior_nsbase, + 2 * $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; + } + + $ns_running = 1; + # Set up NamingService environment + $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + # Invoke node daemon. + print "Invoking node daemon\n"; + $status = run_node_daemons (); + + if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; + } + + $daemons_running = 1; + + # Invoke execution manager. + print "Invoking execution manager\n"; + $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); + $EM->Spawn (); + + if ($tg_exe_man->WaitForFileTimed ($ior_embase, + 2 * $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; + } + + $em_running = 1; + + # Invoke executor - start the application -. + print "Invoking executor - launch the application -\n"; + $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $file -k file://$ior_emfile"); + $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ()); + + print "Sleeping 5 seconds to allow task to complete\n"; + sleep (5); + + print "Teardown the application\n"; + $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-k file://$ior_emfile -x $file -s"); + $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ()); + print "Executor finished.\n"; + + delete_ior_files (); + kill_open_processes (); +} + +delete_ior_files (); +kill_open_processes (); + +exit $status; -- cgit v1.2.1