aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/worker/worker.cli10
-rw-r--r--bbot/worker/worker.cxx8
2 files changed, 14 insertions, 4 deletions
diff --git a/bbot/worker/worker.cli b/bbot/worker/worker.cli
index e3e37ce..0edefe0 100644
--- a/bbot/worker/worker.cli
+++ b/bbot/worker/worker.cli
@@ -82,7 +82,7 @@ namespace bbot
specified, then the user's home directory is used."
}
- path --environment
+ path --env-script
{
"<path>",
"The environment setup executable path. This option is normally passed
@@ -90,6 +90,14 @@ namespace bbot
build mode."
}
+ string --env-target
+ {
+ "<target>",
+ "The environment setup executable target argument. This option is
+ normally passed by the worker running in the startup mode to the worker
+ executed in the build mode."
+ }
+
// Testing options.
//
string --tftp-host = "196.254.111.222"
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 90b429e..2105939 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -267,7 +267,7 @@ run_cmd (step_id step,
dr << '\n'
<< what << '\n'
<< " current dir: " << current_directory () << '\n'
- << " environment: " << ops.environment ();
+ << " environment: " << ops.env_script () << ' ' << ops.env_target ();
if (!last_cmd.empty ())
dr << '\n'
@@ -2161,6 +2161,8 @@ startup ()
//
strings os;
+ string tg (tm.target.string ());
+
// Use the name=value notation for options to minimize the number of
// arguments passed to the environment setup executable. Note that the
// etc/environments/default-*.bat scripts can only handle the limited
@@ -2175,7 +2177,8 @@ startup ()
if (ops.tftp_host_specified ())
os.push_back ("--tftp-host=" + ops.tftp_host ());
- os.push_back (string ("--environment=") + pp.effect_string ());
+ os.push_back (string ("--env-script=") + pp.effect_string ());
+ os.push_back ("--env-target=" + tg);
// Note that we use the effective (absolute) path instead of recall since
// we may have changed the CWD.
@@ -2191,7 +2194,6 @@ startup ()
// result manifest. There is no reason to retry (most likely there is
// nobody listening on the other end anymore).
//
- string tg (tm.target.string ());
switch (run_io_exit (trace, 0, 2, 2, pp, tg, argv0.effect_string (), os))
{
case 3: