summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2020-05-01 15:26:09 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-04 20:42:40 +0000
commitb06280cbd0a0105e5b8f166ab0b7be030fe87f9c (patch)
treeb584b31369a251b77df4e1d75d12395ef98f812c /site_scons
parent765451d3924cdabb7253f88c7da3e641c7d4b103 (diff)
downloadmongo-b06280cbd0a0105e5b8f166ab0b7be030fe87f9c.tar.gz
SERVER-47904 Python jobs should flow through icerun
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/icecream.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/site_scons/site_tools/icecream.py b/site_scons/site_tools/icecream.py
index c901e879a21..3e610471649 100644
--- a/site_scons/site_tools/icecream.py
+++ b/site_scons/site_tools/icecream.py
@@ -254,15 +254,24 @@ def generate(env):
env["SHCCCOM"] = " ".join([icecc_string, env["SHCCCOM"]])
env["SHCXXCOM"] = " ".join([icecc_string, env["SHCXXCOM"]])
- # Make link like jobs flow through icerun so we don't kill the
- # local machine.
- #
- # TODO: Should we somehow flow SPAWN or other universal shell launch through
- # ICERUN to avoid saturating the local machine, and build something like
- # ninja pools?
- env["ARCOM"] = "$( $ICERUN $) " + env["ARCOM"]
- env["LINKCOM"] = "$( $ICERUN $) " + env["LINKCOM"]
- env["SHLINKCOM"] = "$( $ICERUN $) " + env["SHLINKCOM"]
+ # Make common non-compile jobs flow through icerun so we don't
+ # kill the local machine. It would be nice to plumb ICERUN in via
+ # SPAWN or SHELL but it is too much. You end up running `icerun
+ # icecc ...`, and icecream doesn't handle that. We could try to
+ # filter and only apply icerun if icecc wasn't present but that
+ # seems fragile. If you find your local machine being overrun by
+ # jobs, figure out what sort they are and extend this part of the
+ # setup.
+ icerun_commands = [
+ "ARCOM",
+ "LINKCOM",
+ "PYTHON",
+ "SHLINKCOM",
+ ]
+
+ for command in icerun_commands:
+ if command in env:
+ env[command] = " ".join(["$( $ICERUN $)", env[command]])
# Uncomment these to debug your icecc integration
# env['ENV']['ICECC_DEBUG'] = 'debug'