From 218c4737a884107dc924d7e1d8b4110ef3e3e1e0 Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Fri, 6 Feb 2009 20:28:51 +0000 Subject: ChangeLogTag: Fri Feb 6 20:28:09 UTC 2009 William R. Otte --- flat/CIAO/ChangeLog | 50 ++++-- .../DAnCE/bin/PythonDAnCE/generator/comp_impl.py | 2 +- .../Null_Component/Null_Component_exec.cpp | 14 ++ .../examples/Null_Component/Null_Component_exec.h | 3 + .../Null_Component/descriptors/Deployment.xsd | 29 ---- .../examples/Null_Component/descriptors/Domain.cdd | 10 -- .../Null_Component/descriptors/NodeMap.dat | 2 +- .../Null_Component/descriptors/Null_Assembly.cid | 13 -- .../descriptors/Null_Assembly_Package.cpd | 11 -- .../Null_Component/descriptors/Null_Component.ccd | 34 ---- .../descriptors/Null_ComponentMonolithicImpl.cid | 35 ---- .../descriptors/Null_Component_Package.cpd | 13 -- .../descriptors/Null_Component_exec.iad | 78 --------- .../descriptors/Null_Component_stub.iad | 56 ------- .../descriptors/Null_Component_svnt.iad | 73 --------- .../Null_Component/descriptors/Null_Homed.cdp | 109 +++++++++++++ .../Null_Component/descriptors/Null_Unhomed.cdp | 85 ++++++++++ .../descriptors/PackageConfiguration.pcd | 8 - .../examples/Null_Component/descriptors/Plan.cdp | 75 --------- .../Null_Component/descriptors/TopLevelPackage.tpd | 6 - .../examples/Null_Component/descriptors/XMI.xsd | 35 ---- .../Null_Component/descriptors/run_test.pl | 180 +++++++++++++++++++++ 22 files changed, 434 insertions(+), 487 deletions(-) delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Deployment.xsd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Domain.cdd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Assembly.cid delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Assembly_Package.cpd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Component.ccd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_ComponentMonolithicImpl.cid delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Component_Package.cpd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Component_exec.iad delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Component_stub.iad delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Component_svnt.iad create mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Homed.cdp create mode 100644 flat/CIAO/examples/Null_Component/descriptors/Null_Unhomed.cdp delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/PackageConfiguration.pcd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/Plan.cdp delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/TopLevelPackage.tpd delete mode 100644 flat/CIAO/examples/Null_Component/descriptors/XMI.xsd create mode 100755 flat/CIAO/examples/Null_Component/descriptors/run_test.pl diff --git a/flat/CIAO/ChangeLog b/flat/CIAO/ChangeLog index f8d03321b40..5c5d45b2ba9 100644 --- a/flat/CIAO/ChangeLog +++ b/flat/CIAO/ChangeLog @@ -1,19 +1,51 @@ +Fri Feb 6 20:28:09 UTC 2009 William R. Otte + + * DAnCE/bin/PythonDAnCE/generator/comp_impl.py: + + Fixes that should have been in previous commit. + + * examples/Null_Component/Null_Component_exec.h: + * examples/Null_Component/Null_Component_exec.cpp: + * examples/Null_Component/descriptors/NodeMap.dat: + * examples/Null_Component/descriptors/Null_Homed.cdp: + * examples/Null_Component/descriptors/Null_Unhomed.cdp: + * examples/Null_Component/descriptors/run_test.pl: + + Ported this example to new CIAO/DAnCE. + + * examples/Null_Component/descriptors/Deployment.xsd: + * examples/Null_Component/descriptors/Domain.cdd: + * examples/Null_Component/descriptors/Null_Assembly.cid: + * examples/Null_Component/descriptors/Null_Assembly_Package.cpd: + * examples/Null_Component/descriptors/Null_Component.ccd: + * examples/Null_Component/descriptors/Null_ComponentMonolithicImpl.cid: + * examples/Null_Component/descriptors/Null_Component_Package.cpd: + * examples/Null_Component/descriptors/Null_Component_exec.iad: + * examples/Null_Component/descriptors/Null_Component_stub.iad: + * examples/Null_Component/descriptors/Null_Component_svnt.iad: + * examples/Null_Component/descriptors/PackageConfiguration.pcd: + * examples/Null_Component/descriptors/Plan.cdp: + * examples/Null_Component/descriptors/TopLevelPackage.tpd: + * examples/Null_Component/descriptors/XMI.xsd: + + Removed these files. + Fri Feb 6 19:51:02 UTC 2009 William R. Otte * DAnCE/bin/PythonDAnCE/generator/comp_impl.py: * DAnCE/bin/PythonDAnCE/generator/home_impl.py: * DAnCE/bin/generate_plan.py: - - Fixes to better handle namespaces components may be declared in. - + + Fixes to better handle namespaces components may be declared in. + * examples/BasicSP/descriptors/run_test.pl: - - Will run plan specified on commad line. - + + Will run plan specified on commad line. + * examples/BasicSP/descriptors/BasicSP_Homed.cdp: - - Same as the _Unhomed plan, except all components are explicitly homed. - + + Same as the _Unhomed plan, except all components are explicitly homed. + Fri Feb 6 19:36:03 UTC 2009 William R. Otte * examples/BasicSP/BMClosedED/BMClosedED_exec.cpp: diff --git a/flat/CIAO/DAnCE/bin/PythonDAnCE/generator/comp_impl.py b/flat/CIAO/DAnCE/bin/PythonDAnCE/generator/comp_impl.py index eaf2ff52d68..e807fc6f58a 100755 --- a/flat/CIAO/DAnCE/bin/PythonDAnCE/generator/comp_impl.py +++ b/flat/CIAO/DAnCE/bin/PythonDAnCE/generator/comp_impl.py @@ -1,7 +1,7 @@ from templet import stringfunction @stringfunction -def template (component_name) : +def template (component_name, namespace) : """ diff --git a/flat/CIAO/examples/Null_Component/Null_Component_exec.cpp b/flat/CIAO/examples/Null_Component/Null_Component_exec.cpp index 89b16cbe55d..3aedbc6ce93 100644 --- a/flat/CIAO/examples/Null_Component/Null_Component_exec.cpp +++ b/flat/CIAO/examples/Null_Component/Null_Component_exec.cpp @@ -107,6 +107,20 @@ namespace CIDL_Null_Component_Impl // Your code here. } + extern "C" NULL_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Null_Component_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_RETURN ( + retval, + Null_Component_exec_i, + ::Components::EnterpriseComponent::_nil ()); + + return retval; + } + //================================================================== // Home Executor Implementation Class: Null_ComponentHome_exec_i //================================================================== diff --git a/flat/CIAO/examples/Null_Component/Null_Component_exec.h b/flat/CIAO/examples/Null_Component/Null_Component_exec.h index 97fe1a4775e..fb0bc6c6edf 100644 --- a/flat/CIAO/examples/Null_Component/Null_Component_exec.h +++ b/flat/CIAO/examples/Null_Component/Null_Component_exec.h @@ -83,6 +83,9 @@ namespace CIDL_Null_Component_Impl ::CCM_Null_Component_Context_var context_; }; + extern "C" NULL_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Null_Component_Impl (void); + class NULL_COMPONENT_EXEC_Export Null_ComponentHome_exec_i : public virtual Null_ComponentHome_Exec, public virtual ::CORBA::LocalObject diff --git a/flat/CIAO/examples/Null_Component/descriptors/Deployment.xsd b/flat/CIAO/examples/Null_Component/descriptors/Deployment.xsd deleted file mode 100644 index fd4ffe5bc7d..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Deployment.xsd +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Domain.cdd b/flat/CIAO/examples/Null_Component/descriptors/Domain.cdd deleted file mode 100644 index b54b660bb7a..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Domain.cdd +++ /dev/null @@ -1,10 +0,0 @@ - - - - E6198ADF-7421-46D8-9C4F-F70273837DAF - - - NodeA - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/NodeMap.dat b/flat/CIAO/examples/Null_Component/descriptors/NodeMap.dat index 1e920ef3e77..51d8967c561 100644 --- a/flat/CIAO/examples/Null_Component/descriptors/NodeMap.dat +++ b/flat/CIAO/examples/Null_Component/descriptors/NodeMap.dat @@ -1 +1 @@ -NodeA corbaloc:iiop:localhost:10000/NodeManager \ No newline at end of file +NodeOne corbaloc:iiop:localhost:10000/NodeManager \ No newline at end of file diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly.cid b/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly.cid deleted file mode 100644 index 0b0d999c161..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly.cid +++ /dev/null @@ -1,13 +0,0 @@ - - - - AB4E18C0-187E-4FEF-95FE-462E199411E5 - - - - Null_Component.ComponentImplementations.Null_Assembly_Container.Null_Assembly.Null_Component - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly_Package.cpd b/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly_Package.cpd deleted file mode 100644 index 8650f99341a..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Assembly_Package.cpd +++ /dev/null @@ -1,11 +0,0 @@ - - - - 051F0532-FC77-4867-8B97-58A8B1AC2692 - - - Null_Component.ComponentImplementations.Null_Assembly_Container.Null_Assembly - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Component.ccd b/flat/CIAO/examples/Null_Component/descriptors/Null_Component.ccd deleted file mode 100644 index c728a17f876..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Component.ccd +++ /dev/null @@ -1,34 +0,0 @@ - - - - 1E762719-4310-41B5-ADC0-084D15E4DA91 - - IDL:Null_Component:1.0 - - IDL:Null_Component:1.0 - - IDL:omg.org/Components/Navigation:1.0 - - IDL:omg.org/Components/Receptacles:1.0 - - IDL:omg.org/Components/Events:1.0 - - IDL:omg.org/Components/CCMObject:1.0 - - IDL:omg.org/CORBA/Object:1.0 - - Null_Component.idl - - - null_facet - IDL:Null_Interface:1.0 - IDL:Null_Interface:1.0 - IDL:omg.org/CORBA/Object:1.0 - true - false - false - false - Facet - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_ComponentMonolithicImpl.cid b/flat/CIAO/examples/Null_Component/descriptors/Null_ComponentMonolithicImpl.cid deleted file mode 100644 index 4e37e838af9..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_ComponentMonolithicImpl.cid +++ /dev/null @@ -1,35 +0,0 @@ - - - - DB0165FE-599E-485B-844E-E8D4C1FA3951 - - - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_stub - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_svnt - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_exec - - - - - - ComponentIOR - - - tk_string - - - Null_Component.ior - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_Package.cpd b/flat/CIAO/examples/Null_Component/descriptors/Null_Component_Package.cpd deleted file mode 100644 index 4f450e87398..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_Package.cpd +++ /dev/null @@ -1,13 +0,0 @@ - - - - FDCE9BA7-20C4-44B0-B1FB-10CC18EC1DB2 - - - - - Null_Component.ComponentImplementations.Null_ComponentImplementation.Null_ComponentMonolithicImpl - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_exec.iad b/flat/CIAO/examples/Null_Component/descriptors/Null_Component_exec.iad deleted file mode 100644 index 1c8c34d20c2..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_exec.iad +++ /dev/null @@ -1,78 +0,0 @@ - - - - 7D050E10-E0DC-4A7A-810D-E847ED9ACC04 - - Null_Component_exec - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_svnt - - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_stub - - - - - entryPoint - - - tk_string - - - create_Null_ComponentHome_Impl - - - - - - architecture - - - tk_string - - - x86 - - - - - - artifactVersion - - - tk_string - - - 0.0.0.0 - - - - - - configuration - - - tk_string - - - Release - - - - - - operatingSystem - - - tk_string - - - Linux - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_stub.iad b/flat/CIAO/examples/Null_Component/descriptors/Null_Component_stub.iad deleted file mode 100644 index 034c4953e8b..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_stub.iad +++ /dev/null @@ -1,56 +0,0 @@ - - - - F8CECE24-F3D4-4162-9A28-1CC7FA48C01B - - Null_Component_stub - - - architecture - - - tk_string - - - x86 - - - - - - artifactVersion - - - tk_string - - - 0.0.0.0 - - - - - - configuration - - - tk_string - - - Release - - - - - - operatingSystem - - - tk_string - - - Linux - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_svnt.iad b/flat/CIAO/examples/Null_Component/descriptors/Null_Component_svnt.iad deleted file mode 100644 index 8484f7a9a13..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Null_Component_svnt.iad +++ /dev/null @@ -1,73 +0,0 @@ - - - - 6DCFFB72-08DB-4546-B206-13B6AC2DB251 - - Null_Component_svnt - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_stub - - - - - entryPoint - - - tk_string - - - create_Null_ComponentHome_Servant - - - - - - architecture - - - tk_string - - - x86 - - - - - - artifactVersion - - - tk_string - - - 0.0.0.0 - - - - - - configuration - - - tk_string - - - Release - - - - - - operatingSystem - - - tk_string - - - Linux - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Homed.cdp b/flat/CIAO/examples/Null_Component/descriptors/Null_Homed.cdp new file mode 100644 index 00000000000..2332e2d346e --- /dev/null +++ b/flat/CIAO/examples/Null_Component/descriptors/Null_Homed.cdp @@ -0,0 +1,109 @@ + + + Null_Homed + + Null_ComponentHomeImplementation + + + + + + home factory + + + tk_string + + + create_Null_ComponentHome_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Null_ComponentHome_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Null_Component_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Null_Component_exec + + + + + + Null_ComponentComponentImplementation + + + + + + + Null_ComponentHome + NodeOne + + + + + + Null_ComponentComponent + NodeOne + + + + + edu.vanderbilt.dre.DAnCE.ExplicitHome + + + tk_string + + + Null_ComponentHome + + + + + + Null_Component_exec + + + Null_Component_exec + + + Null_Component_svnt + + + Null_Component_svnt + + + Null_Component_stub + + + Null_Component_stub + + \ No newline at end of file diff --git a/flat/CIAO/examples/Null_Component/descriptors/Null_Unhomed.cdp b/flat/CIAO/examples/Null_Component/descriptors/Null_Unhomed.cdp new file mode 100644 index 00000000000..c259d000b9e --- /dev/null +++ b/flat/CIAO/examples/Null_Component/descriptors/Null_Unhomed.cdp @@ -0,0 +1,85 @@ + + + Null_Homed + + + Null_ComponentComponentImplementation + + + + + + component factory + + + tk_string + + + create_Null_Component_Impl + + + + + edu.vanderbilt.dre.CIAO.ServantEntrypoint + + + tk_string + + + create_Null_Component_Servant + + + + + edu.vanderbilt.dre.CIAO.ServantArtifact + + + tk_string + + + Null_Component_svnt + + + + + edu.vanderbilt.dre.CIAO.ExecutorArtifact + + + tk_string + + + Null_Component_exec + + + + + + Null_ComponentComponent + NodeOne + + + + + + Null_Component_exec + + + Null_Component_exec + + + Null_Component_svnt + + + Null_Component_svnt + + + Null_Component_stub + + + Null_Component_stub + + \ No newline at end of file diff --git a/flat/CIAO/examples/Null_Component/descriptors/PackageConfiguration.pcd b/flat/CIAO/examples/Null_Component/descriptors/PackageConfiguration.pcd deleted file mode 100644 index 0ed852e5164..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/PackageConfiguration.pcd +++ /dev/null @@ -1,8 +0,0 @@ - - - - 168FF6BD-40CF-4A06-A380-66266A32F168 - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/Plan.cdp b/flat/CIAO/examples/Null_Component/descriptors/Plan.cdp deleted file mode 100644 index 4389f295e1d..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/Plan.cdp +++ /dev/null @@ -1,75 +0,0 @@ - - - - FD6E278D-20AC-4FFD-B359-382963C5D9A1 - - - Null_Component.ComponentImplementations.Null_ComponentImplementation.Null_ComponentMonolithicImpl - - _F8CECE24-F3D4-4162-9A28-1CC7FA48C01B - _6DCFFB72-08DB-4546-B206-13B6AC2DB251 - _7D050E10-E0DC-4A7A-810D-E847ED9ACC04 - - - - Null_Component.ComponentImplementations.Null_Assembly_Container.Null_Assembly.Null_Component - NodeA - - _DB0165FE-599E-485B-844E-E8D4C1FA3951 - - ComponentIOR - - - tk_string - - - Null_Component.ior - - - - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_stub - - - Null_Component_stub - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_svnt - - - Null_Component_svnt - - entryPoint - - - tk_string - - - create_Null_ComponentHome_Servant - - - - - - - Null_Component.ImplementationArtifacts.Null_ComponentArtifacts.Null_Component_exec - - - Null_Component_exec - - entryPoint - - - tk_string - - - create_Null_ComponentHome_Impl - - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/TopLevelPackage.tpd b/flat/CIAO/examples/Null_Component/descriptors/TopLevelPackage.tpd deleted file mode 100644 index 8c4a5d46dba..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/TopLevelPackage.tpd +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/XMI.xsd b/flat/CIAO/examples/Null_Component/descriptors/XMI.xsd deleted file mode 100644 index f4adac91934..00000000000 --- a/flat/CIAO/examples/Null_Component/descriptors/XMI.xsd +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/flat/CIAO/examples/Null_Component/descriptors/run_test.pl b/flat/CIAO/examples/Null_Component/descriptors/run_test.pl new file mode 100755 index 00000000000..76b37e5a3bf --- /dev/null +++ b/flat/CIAO/examples/Null_Component/descriptors/run_test.pl @@ -0,0 +1,180 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE"; +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; +$daemons = 1; +@ports = ( 60001 ); +@iorfiles = ( "NodeApp1.ior" ); +@nodenames = ( "NodeOne" ); +$status = 0; +$dat_file = "NodeMap.dat"; + +$nsior = PerlACE::LocalFile ("ns.ior"); + +$E = 0; +$EM = 0; +$retval = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); + unlink PerlACE::LocalFile ("ns.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService --instance-nc corbaloc:rir:/NameService"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; +} + +if ($#ARGV == -1) +{ + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} else { + @files = @ARGV; +} + +foreach $file (@files) { + print "Starting test for deployment $file\n"; + delete_ior_files (); + + print STDERR "Starting Naming Service\n"; + + $NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); + $NS->Spawn (); + + if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) + { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; + } + $ns_running = 1; + +# Set up NamingService environment + $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + + +# Invoke node daemons. + print "Invoking node daemons\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 = new PerlACE::Process ("$DAnCE/bin/dance_execution_manager", + "-eEM.ior --domain-nc corbaloc:rir:/NameService"); + $EM->Spawn (); + + if (PerlACE::waitforfile_timed ("EM.ior", + $PerlACE::wait_interval_for_process_creation) == -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 - start the application -\n"; + $E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-x $file -k file://EM.ior"); + + $E->SpawnWaitKill (5000); + + if ($status != 0) + { + print "ERROR: dance_plan_launcher returned an error code while deploying $file\n"; + $retval = -1; + } + + # Invoke executor - stop the application -. + print "Invoking executor - stop the application -\n"; + $E = + new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-k file://EM.ior -x $file -q"); + $E->SpawnWaitKill (3000); + + print "Executor returned.\n"; + + delete_ior_files (); + kill_open_processes (); +} + +delete_ior_files (); +kill_open_processes (); + +exit $status; -- cgit v1.2.1