Skip to content
Snippets Groups Projects
Commit 01330d63 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

update DAG hash calculation to include test dependencies

Spack's spec hashing mechanism considers only build, link, and run dependencies, overlooking test dependencies. As a result, although Spack correctly concretizes environments when `--test root` is specified (including test dependencies), the resulting lockfile dict only includes the deps whose types affect the hash (build/link/run) and when the env is loaded, test dependencies are not, and tests fail. The workaround suggested in the Spack issue [here](https://github.com/spack/spack/issues/29447) is deleting the lockfile every time and allowing `spack install --test root` to recreate it. By extending Spack's default hash type to include test dependencies, the need for this workaround is eliminated and concretization and installation can be split into separate steps.
parent e30fedab
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ def __call__(self, spec):
#: Spack's deployment hash. Includes all inputs that can affect how a package is built.
dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN, package_hash=True, name="hash")
dag_hash = SpecHashDescriptor(depflag=dt.BUILD | dt.LINK | dt.RUN | dt.TEST, package_hash=True, name="hash")
#: Hash descriptor used only to transfer a DAG, as is, across processes
......
  • Author Owner

    Note: when installing with --test root this change will change the hashes of EBRAINS top-level specs, but it will leave the hashes of dependencies unchanged, since we don't run tests for dependencies.

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment