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-05 21:37:35 +0000
commit0a60b3480c4073d4ddd44a315a82a8dc1e369a47 (patch)
tree8fb50a1b60c1b7dbb8223398194812c0fd177d59 /site_scons
parent3b49072f5c12fea5b64003f7116d6d8c81e36162 (diff)
downloadmongo-0a60b3480c4073d4ddd44a315a82a8dc1e369a47.tar.gz
SERVER-47904 Python jobs should flow through icerun
(cherry picked from commit b06280cbd0a0105e5b8f166ab0b7be030fe87f9c)
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 065729fc788..88666875944 100644
--- a/site_scons/site_tools/icecream.py
+++ b/site_scons/site_tools/icecream.py
@@ -246,15 +246,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'