summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijke Hengstmengel <MHengstmengel@users.noreply.github.com>2011-10-31 13:25:57 +0000
committerMarijke Hengstmengel <MHengstmengel@users.noreply.github.com>2011-10-31 13:25:57 +0000
commit4a59ecca2628ad51f876a5b6456b3f82a030cc8b (patch)
tree92854b1938e50e522d078b9bf35c4f2427952a13
parentfd558b4e085ba3e31079c11db9cf9b35ac889d18 (diff)
downloadATCD-4a59ecca2628ad51f876a5b6456b3f82a030cc8b.tar.gz
Mon Oct 31 13:19:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* tests/Collocation/Coll_Base/Base.idl: * tests/Collocation/Coll_Base/Base.mpc: * tests/Collocation/Receiver/Receiver.idl: * tests/Collocation/Receiver/Receiver_exec.h: * tests/Collocation/Receiver/Receiver_exec.cpp: * tests/Collocation/Sender/Sender.idl: * tests/Collocation/Sender/Sender_exec.h: * tests/Collocation/Sender/Sender_exec.cpp: * tests/Collocation/descriptors/PlanAllOnOne.cdp: * tests/Collocation/descriptors/run_test.pl: Expanded test. Use different CollocationStrategies via attributes in deploymentplans.
-rw-r--r--CIAO/ChangeLog.BRANCH18
-rw-r--r--CIAO/tests/Collocation/Coll_Base/Base.idl3
-rw-r--r--CIAO/tests/Collocation/Coll_Base/Base.mpc2
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver.idl6
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver_exec.cpp40
-rw-r--r--CIAO/tests/Collocation/Receiver/Receiver_exec.h7
-rw-r--r--CIAO/tests/Collocation/Sender/Sender.idl3
-rw-r--r--CIAO/tests/Collocation/Sender/Sender_exec.cpp72
-rw-r--r--CIAO/tests/Collocation/Sender/Sender_exec.h9
-rw-r--r--CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp12
-rwxr-xr-xCIAO/tests/Collocation/descriptors/run_test.pl210
11 files changed, 234 insertions, 148 deletions
diff --git a/CIAO/ChangeLog.BRANCH b/CIAO/ChangeLog.BRANCH
index 6d56ee6423c..0f44cd54bd5 100644
--- a/CIAO/ChangeLog.BRANCH
+++ b/CIAO/ChangeLog.BRANCH
@@ -1,3 +1,17 @@
+Mon Oct 31 13:19:15 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ * tests/Collocation/Coll_Base/Base.idl:
+ * tests/Collocation/Coll_Base/Base.mpc:
+ * tests/Collocation/Receiver/Receiver.idl:
+ * tests/Collocation/Receiver/Receiver_exec.h:
+ * tests/Collocation/Receiver/Receiver_exec.cpp:
+ * tests/Collocation/Sender/Sender.idl:
+ * tests/Collocation/Sender/Sender_exec.h:
+ * tests/Collocation/Sender/Sender_exec.cpp:
+ * tests/Collocation/descriptors/PlanAllOnOne.cdp:
+ * tests/Collocation/descriptors/run_test.pl:
+ Expanded test. Use different CollocationStrategies via
+ attributes in deploymentplans.
+
Tue Oct 27 07:16:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* ciao/Containers/Extension/Extension_Containers.mpc:
@@ -44,7 +58,7 @@ Wed Oct 26 07:28:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* ciao/Servants/Servants.mpc:
Disable Servant_Activator and Port_Activator functionality,
Later on if build successfull delete lines
-
+
* tests/Collocation/Coll_Base/Base.mpc:
* tests/Collocation/Receiver/Receiver.mpc:
* tests/Collocation/Sender/Sender.mpc:
@@ -54,7 +68,7 @@ Wed Oct 26 07:28:24 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl>
Disable debug logs
* bin/ciao_tests.lst:
- Add CIAO/tests/Collocation
+ Add CIAO/tests/Collocation
Local Variables:
diff --git a/CIAO/tests/Collocation/Coll_Base/Base.idl b/CIAO/tests/Collocation/Coll_Base/Base.idl
index 8633db8c001..d1ba48ad9f3 100644
--- a/CIAO/tests/Collocation/Coll_Base/Base.idl
+++ b/CIAO/tests/Collocation/Coll_Base/Base.idl
@@ -12,8 +12,7 @@ struct pointer_id
// Interfaces for communication between Sender and Receiver
interface Hello {
- //string say_hello ();
- void set_point(in pointer_id p);
+ void set_point(in pointer_id p, in string strategy);
};
diff --git a/CIAO/tests/Collocation/Coll_Base/Base.mpc b/CIAO/tests/Collocation/Coll_Base/Base.mpc
index cd226c6f5b7..71e624a9d43 100644
--- a/CIAO/tests/Collocation/Coll_Base/Base.mpc
+++ b/CIAO/tests/Collocation/Coll_Base/Base.mpc
@@ -8,7 +8,7 @@ project(CollBase_idl_gen) : componentidldefaults {
-Wb,stub_export_include=CollBase_stub_export.h \
-Wb,skel_export_macro=BASE_SKEL_Export \
-Wb,skel_export_include=CollBase_skel_export.h \
- -Gxhex -Gxhsk -Gxhst -Gex -I ..
+ -Gxhex -Gxhsk -Gxhst -Gex -Sp -I ..
IDL_Files {
Base.idl
diff --git a/CIAO/tests/Collocation/Receiver/Receiver.idl b/CIAO/tests/Collocation/Receiver/Receiver.idl
index d0782e58c43..d40e794b9ad 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver.idl
+++ b/CIAO/tests/Collocation/Receiver/Receiver.idl
@@ -8,12 +8,10 @@
#include "Coll_Base/Base.idl"
component Receiver {
- // Which interfaces the Receiver provides.
- //provides Bye bye_from_rec;
-
- // Which interfaces Receiver uses.
+ // Which interfaces Receiver uses.
uses Hello hello_to_rec;
+ attribute string strategy;
};
#endif /* RECEIVER_IDL_ */
diff --git a/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp b/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
index 34e98f1c14f..4f67f5e937c 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
+++ b/CIAO/tests/Collocation/Receiver/Receiver_exec.cpp
@@ -54,7 +54,8 @@ namespace CIAO_Receiver_Impl
*/
Receiver_exec_i::Receiver_exec_i (void)
- : interval_ (2, 1)
+ : interval_ (2, 1),
+ strategy_("thru_poa")
{
ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::Receiver_exec_i \n "));
ACE_NEW_THROW_EX (this->hello_generator_,
@@ -91,8 +92,6 @@ namespace CIAO_Receiver_Impl
void
Receiver_exec_i::tick (void)
{
- ACE_DEBUG ((LM_DEBUG, "$$$$$$$$$$$$$$ Start interface method in Receiver_exec_i::tick - "
- "set point for sender.\n"));
try
{
/// Retrieve the connection to the sender.
@@ -100,13 +99,9 @@ namespace CIAO_Receiver_Impl
this->ciao_context_->get_connection_hello_to_rec ();
if (! ::CORBA::is_nil (hello_to_rec.in ()))
{
- /* CORBA::String_var message = hello_to_rec->say_hello ();
- ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::tick - "
- "got hello-message from sender <%C>.\n",
- message.in()));
-*/ pointer_id::_var_type p = new pointer_id;
+ pointer_id::_var_type p = new pointer_id;
p->point = (long)p.ptr ();
- hello_to_rec->set_point(p.in());
+ hello_to_rec->set_point(p.in(), this->strategy_.in());
ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::tick - "
"set_hello-point with pointer %@\n",
@@ -119,6 +114,18 @@ namespace CIAO_Receiver_Impl
"no connection hello_to_rec with sender.\n"));
}
}
+ catch (const CORBA::INTERNAL& ex)
+ {
+ if (ACE_OS::strcmp ("no_thru_poa", this->strategy_.in())== 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "OK: Receiver received expected exception\n"));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::tick - "
+ "Error: Unexpected exception caught\n"));
+ }
+ }
catch (const CORBA::Exception &e)
{
/// Always catch CORBA exceptions. There might be somthing wrong with
@@ -132,12 +139,21 @@ namespace CIAO_Receiver_Impl
ACE_ERROR ((LM_ERROR, "Receiver_exec_i::tick - "
"Error: Unexpected and unknown exception caught\n"));
}
- ACE_DEBUG ((LM_DEBUG, "$$$$$$$$$$$$$$ End interface method in Receiver_exec_i::tick - "
- "set point for sender.\n"));
-
}
// Component attributes and port operations.
+ char*
+ Receiver_exec_i::strategy (void)
+ {
+ return ::CORBA::string_dup (this->strategy_);
+ }
+
+ void
+ Receiver_exec_i::strategy (const char* strategy)
+ {
+ this->strategy_ = ::CORBA::string_dup (strategy);
+ }
+
// Operations from Components::SessionComponent.
void
diff --git a/CIAO/tests/Collocation/Receiver/Receiver_exec.h b/CIAO/tests/Collocation/Receiver/Receiver_exec.h
index 786a468d924..f307546bd6b 100644
--- a/CIAO/tests/Collocation/Receiver/Receiver_exec.h
+++ b/CIAO/tests/Collocation/Receiver/Receiver_exec.h
@@ -70,6 +70,12 @@ namespace CIAO_Receiver_Impl
/** @name User defined public operations. */
//@{
void tick (void);
+
+ char*
+ strategy (void);
+
+ void
+ strategy (const char* strategy);
//@}
private:
@@ -85,6 +91,7 @@ namespace CIAO_Receiver_Impl
//@{
HelloGenerator * hello_generator_;
ACE_Time_Value interval_;
+ ::CORBA::String_var strategy_;
ACE_Reactor* reactor (void);
//@}
};
diff --git a/CIAO/tests/Collocation/Sender/Sender.idl b/CIAO/tests/Collocation/Sender/Sender.idl
index 257a71c1079..ecc70bff6c8 100644
--- a/CIAO/tests/Collocation/Sender/Sender.idl
+++ b/CIAO/tests/Collocation/Sender/Sender.idl
@@ -8,9 +8,6 @@
component Sender {
provides Hello hello;
-
- // Which interfaces the Sender uses.
- //uses Bye bye;
};
#endif /* SENDER_IDL_ */
diff --git a/CIAO/tests/Collocation/Sender/Sender_exec.cpp b/CIAO/tests/Collocation/Sender/Sender_exec.cpp
index eec14635c32..64daf1a536e 100644
--- a/CIAO/tests/Collocation/Sender/Sender_exec.cpp
+++ b/CIAO/tests/Collocation/Sender/Sender_exec.cpp
@@ -18,33 +18,64 @@ namespace CIAO_Sender_Impl
}
// Operations from ::Hello
-/* char *
- hello_exec_i::say_hello (void)
- {
- ACE_DEBUG ((LM_DEBUG, "SENDER: hello_exec_i::say_hello .\n"));
- return CORBA::string_dup ("Hello from sender.");
- }
-*/
void
- hello_exec_i::set_point (const pointer_id &p)
+ hello_exec_i::set_point (const pointer_id &p, const char * strat)
{
- ACE_DEBUG ((LM_DEBUG, "SENDER: hello_exec_i::set_point pointer <%@>\n", (void *)&p));
- CORBA::Long ptr_nmb = (long)&p;
- if (ptr_nmb == p.point)
+ CORBA::Boolean coll = false;
+ if ((ACE_OS::strcmp("direct", strat) == 0) ||
+ (ACE_OS::strcmp("best", strat) == 0))
+ coll = true;
+ else if (ACE_OS::strcmp("no_collocation", strat) == 0)
+ coll = false;
+ else
+ ACE_ERROR ((LM_DEBUG, "Error: hello_exec_i::set_point - "
+ "Unexpected strategy <%C> \n",
+ strat));
+
+ ACE_DEBUG ((LM_DEBUG,
+ "SENDER: hello_exec_i::set_point pointer <%@>\n",
+ (void *)&p));
+
+ CORBA::Long ptr_nmb = (long)&p;
+ if (coll)
{
- ACE_DEBUG ((LM_DEBUG, "hello_exec_i::set_point - "
- "current pointer <%u> is same as starting pointer <%u>,"
- "direct or thru_poa collocation ! \n",
- ptr_nmb, p.point));
+ if (ptr_nmb == p.point)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "hello_exec_i::set_point - current pointer <%u> "
+ " is same as starting pointer <%u>,"
+ "direct or thru_poa collocation ! \n",
+ ptr_nmb, p.point));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Error: hello_exec_i::set_point - current pointer <%u> "
+ " is not the same as starting pointer <%u>"
+ ", No Collocation\n",
+ ptr_nmb, p.point));
+ }
}
else
{
- ACE_ERROR ((LM_DEBUG, "Error: hello_exec_i::set_point - "
- "current pointer <%u> is not the same as starting pointer <%u>"
- ", No Collocation\n",
- ptr_nmb, p.point));
+ if (ptr_nmb == p.point)
+ {
+ ACE_ERROR ((
+ LM_DEBUG,
+ "Error: hello_exec_i::set_point - current pointer <%u> "
+ " is the same as starting pointer <%u>"
+ ", Unexpected collocation\n",
+ ptr_nmb, p.point));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "hello_exec_i::set_point - current pointer <%u>"
+ " is not the same as starting pointer <%u>,"
+ " No collocation, as expected ! \n",
+ ptr_nmb, p.point));
+ }
}
- //return p._retn ();
}
/**
@@ -81,6 +112,7 @@ namespace CIAO_Sender_Impl
this->ciao_hello_.in ());
}
+
// Operations from Components::SessionComponent.
void
Sender_exec_i::set_session_context (
diff --git a/CIAO/tests/Collocation/Sender/Sender_exec.h b/CIAO/tests/Collocation/Sender/Sender_exec.h
index 33d6d868036..f127fa5d916 100644
--- a/CIAO/tests/Collocation/Sender/Sender_exec.h
+++ b/CIAO/tests/Collocation/Sender/Sender_exec.h
@@ -62,11 +62,8 @@ namespace CIAO_Sender_Impl
/** @name Operations and attributes from Hello */
//@{
-
-// virtual
- // char * say_hello (void);
virtual
- void set_point (const pointer_id & );
+ void set_point (const pointer_id & , const char *);
//@}
@@ -96,8 +93,7 @@ namespace CIAO_Sender_Impl
virtual ::CCM_Hello_ptr
get_hello (void);
-
- //@}
+ //@}
/** @name Operations from Components::SessionComponent. */
//@{
@@ -123,7 +119,6 @@ namespace CIAO_Sender_Impl
/** @name User defined members. */
//@{
-
//@}
};
diff --git a/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp b/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
index aeb6ce2471e..697c6b75cf3 100644
--- a/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
+++ b/CIAO/tests/Collocation/descriptors/PlanAllOnOne.cdp
@@ -138,7 +138,6 @@
<kind>tk_string</kind>
</type>
<value>
- <!--string>-ORBCollocation global -ORBCollocationStrategy thru_poa</string-->
<string>-ORBCollocation global -ORBCollocationStrategy direct</string>
<!--string>-ORBCollocation global -ORBCollocationStrategy best</string-->
<!--string>-ORBCollocation no</string-->
@@ -159,6 +158,17 @@
<node>One</node>
<source/>
<implementation xmi:idref="ReceiverImpl" />
+ <configProperty>
+ <name>strategy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>direct</string>
+ </value>
+ </value>
+ </configProperty>
</instance>
<connection>
diff --git a/CIAO/tests/Collocation/descriptors/run_test.pl b/CIAO/tests/Collocation/descriptors/run_test.pl
index fc0934e4f01..cbace01d475 100755
--- a/CIAO/tests/Collocation/descriptors/run_test.pl
+++ b/CIAO/tests/Collocation/descriptors/run_test.pl
@@ -9,7 +9,7 @@ use lib "$ENV{'ACE_ROOT'}/bin";
use PerlACE::TestTarget;
#$ENV{'DANCE_LOG_LEVEL'}=9;
-#$ENV{'CIAO_LOG_LEVEL'}=9;
+$ENV{'CIAO_LOG_LEVEL'}=1;
#$ENV{'TAO_orbdebug'}=2;
#$ENV{'DANCE_TRACE_ENABLE'}=1;
#$ENV{'CIAO_TRACE_ENABLE'}=1;
@@ -139,107 +139,125 @@ sub run_node_daemons {
return 0;
}
-create_targets ();
-init_ior_files ();
-
-# Invoke naming service
-
-$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
-
-$ns_status = $NS->Spawn ();
-
-if ($ns_status != 0) {
- print STDERR "ERROR: Unable to execute the naming service\n";
- kill_open_processes ();
- exit 1;
-}
-
-print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
-
-if ($tg_naming->WaitForFileTimed ($ior_nsbase,
- $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 daemon\n";
- kill_open_processes ();
- exit 1;
-}
-
-$daemons_running = 1;
-
-# Invoke execution manager.
-print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
-$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
- "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
-$em_status = $EM->Spawn ();
-
-if ($em_status != 0) {
- print STDERR "ERROR: dance_execution_manager returned $em_status";
- exit 1;
-}
-
-if ($tg_exe_man->WaitForFileTimed ($ior_embase,
- $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";
-
-print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
-$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
- "-x $cdp_file -k file://$ior_emfile -l");
-$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
-
-if ($pl_status != 0) {
- print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
- kill_open_processes ();
- exit 1;
+if ($#ARGV == -1) {
+ opendir(DIR, ".");
+ @files = grep(/\.cdp$/,readdir(DIR));
+ closedir(DIR);
}
-
-for ($i = 0; $i < $nr_daemon; ++$i) {
- if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
- $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
- print STDERR "ERROR: The ior file of daemon $i could not be found\n";
- kill_open_processes ();
- exit 1;
- }
+else {
+ @files = @ARGV;
}
-sleep (15);
-
-# Invoke executor - stop the application -.
-print "Invoking executor - shutting down -\n";
-print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
-
-$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
- "-k file://$ior_emfile -x $cdp_file -s");
-$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+create_targets ();
+init_ior_files ();
-if ($pl_status != 0) {
- print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
- kill_open_processes ();
- exit 1;
+foreach $file (@files) {
+ print "Starting test for deployment $file\n";
+
+ # Invoke naming service
+
+ $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+ $ns_status = $NS->Spawn ();
+
+ if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+ if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $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 daemon\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ $daemons_running = 1;
+
+ # Invoke execution manager.
+ print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+ $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+ $em_status = $EM->Spawn ();
+
+ if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+ }
+
+ if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $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";
+
+ print "Start dance_plan_launcher.exe with -x $file -k file://$ior_emfile\n";
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $file -k file://$ior_emfile -l");
+ $pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+ if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+ }
+
+ sleep (15);
+
+ # Invoke executor - stop the application -.
+ print "Invoking executor - shutting down -\n";
+ print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $file\n";
+
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $file -s");
+ $pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+ if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ delete_ior_files ();
+ kill_open_processes ();
+ # Sleep for a couple seconds to make sure everything has a chance to shut down.
+ sleep 5;
}
-
delete_ior_files ();
kill_open_processes ();
+
exit $status;