Set MPI providers for test config#16003
Conversation
…s to avoid using providers that are not intended to be installed by Spack
This comment has been minimized.
This comment has been minimized.
… some issue with that
…ts in concretize are failing
… right locations (was omitting the final directory and only using the root)
…se an incompatible arch will be chosen and the compiler pref will be ignored
… implies some issue with that" This reverts commit 37719a9.
|
Extra fixes based on follow-up errors:
Additional notes
Based on that, my additional suggestion (which may be appropriate for this PR) is to raise an error if a user tries to call |
…d to initialize scopes every time it is used if I do that
…efactored to initialize scopes every time it is used if I do that" This reverts commit d31be68.
alalazo
left a comment
There was a problem hiding this comment.
LGTM, I just have a few questions/comments.
|
@scheibelp Don't know what went wrong, but apparently this PR is not passing unit tests on |
|
OK - I don't have time to fix this so I'll have to revert it and get back to fixing whatever other test pollution is occurring that is resulting in this next week. |
…)" This was breaking tests on develop.
…pack#16003)" (spack#16420)" This reverts commit 40df44e.
This fixes some errors with setting up test configuration. These errors do not cause current Spack tests to fail but do create red herring issues elsewhere (see #15666). Fixing these errors leads to more errors in tests that depended on the original misconfigured state, so those are also addressed here. This is an update to #16003 which accounts for some unit tests with conflicting config/mutable_config fixtures. These conflicts were not exposed until the mutable_config fixture was fixed. Details are included below. The change which builds on #16003 is prefixed with "(new)". * For tests that use the real Spack package repository, the config needs to avoid using MPI providers that are not intended to be installed by Spack. Without this, it is possible that Spack tests which concretize the MPI virtual will end up trying to use an implementation that it shouldn't (e.g. one that is always provided externally). See #15666 for an example. * The mutable_config test fixture was not initializing the scope roots to the right directories (so the resulting config was empty). * The current_host fixture in the concretize.py tests was using the config fixture rather than mutable_config, and was polluting the config cache for other tests. * One test in concretize.py was clearing a nonexistent cache (PackagePrefs._packages_config_cache). This reference has been removed. * The test 'test_preferred_compilers' was was depending on cross test config pollution to succeed. The initial spec before concretization has been updated to updated to be explicit about the desired result. * (new) For tests that use install_mockery and mutable_config, replace install_mockery with a separate install_mockery_mutable_config fixture that is exactly the same as install_mockery but uses the mutable_config fixture to avoid conflicts.
For tests that use the real Spack package repository, the config needs to avoid using MPI providers that are not intended to be installed by Spack. Without this, it is possible that Spack tests which concretize the MPI virtual will end up trying to use an implementation that it shouldn't (e.g. one that is always provided externally).
See: #15666 (and specifically the tests for it at https://travis-ci.org/github/spack/spack/jobs/672203234)