diff options
author | Richard Samuels <richard.l.samuels@gmail.com> | 2022-05-02 17:34:56 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-02 19:26:14 +0000 |
commit | 561d65eebd69ee00c98e8f19592d9f1eb9798a7e (patch) | |
tree | 28253baccd9a54b2329b632463510ef9c2492efc /site_scons/site_tools/auto_install_binaries.py | |
parent | 1e7460eee6713d996c2781423529aa0af6160d95 (diff) | |
download | mongo-561d65eebd69ee00c98e8f19592d9f1eb9798a7e.tar.gz |
SERVER-65347 Add testing to ensure that generated ninja files are deterministic
Diffstat (limited to 'site_scons/site_tools/auto_install_binaries.py')
-rw-r--r-- | site_scons/site_tools/auto_install_binaries.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/site_scons/site_tools/auto_install_binaries.py b/site_scons/site_tools/auto_install_binaries.py index acc248c5229..fc34fddd8ae 100644 --- a/site_scons/site_tools/auto_install_binaries.py +++ b/site_scons/site_tools/auto_install_binaries.py @@ -270,8 +270,8 @@ def scan_for_transitive_install(node, env, _path): installed_children = set( grandchild - for child in node.children() - for direct_children in child.children() + for source in node.sources + for direct_children in source.children() for grandchild in direct_children.get_executor().get_all_targets() if direct_children.get_executor() and grandchild.has_builder() ) @@ -286,20 +286,9 @@ def scan_for_transitive_install(node, env, _path): child_component = get_component(child) child_entry = get_alias_map_entry(env, child_component, child_role) - # This is where component inheritance happens. We need a default - # component for everything so we can store it but if during - # transitive scanning we see a child with the default component here - # we will move that file to our component. This prevents - # over-stepping the DAG bounds since the default component is likely - # to be large and an explicitly tagged file is unlikely to depend on - # everything in it. - if child_component == env.get(DEFAULT_COMPONENT): - setattr(node.attributes, COMPONENT, component) - for f in auto_installed_files: - child_entry.files.discard(f) - entry.files.update(auto_installed_files) - elif component != child_component: - entry.dependencies.add(child_entry) + if component != child_component: + if child_component != env.get(DEFAULT_COMPONENT): + entry.dependencies.add(child_entry) results.update(auto_installed_files) |