spack audit: add test for package detection#28092
Closed
alalazo wants to merge 1 commit intospack:developfrom
Closed
spack audit: add test for package detection#28092alalazo wants to merge 1 commit intospack:developfrom
alalazo wants to merge 1 commit intospack:developfrom
Conversation
This commit adds a new audit type that, based on the content of a `detection_test.yaml` file placed alongside `package.py`, performs a series of synthetic detection tests.
58f7e24 to
113a740
Compare
Member
Author
|
For reviewer's reference, here's how it would look like if we move metadata to a dict literal in |
4 tasks
Member
Author
|
Closing according to this #18175 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #21343
closes #18175
This PR adds a new type of audit, triggered by:
$ spack audit externalsthat verifies the detection of external packages. The overall mechanism is based on providing some metadata to mock the detection of software alongside the recipe in
package.py. The PR is an alternative to the two at the top, that perform the same tests as unit tests.spack audit externalswill be used in following PRs to replicate all the compiler detection unit tests at the level of each package providing a compiler. Moving these tests to packages is a required step towards compiler as dependencies.Notes
The metadata in the PR is in the form of a YAML file called
detection_test.yaml, rather than a literal dictionary inpackage.pyas tried in #21343. This is because having seen both options I like the YAML file better as it doesn't bloat the recipe - but of course I'm open to change that if there's a strong consensus towards coding a literal dictionary. Link to previous discussion on whether having a YAML or a dict literal is at #18175 (comment)