Skip to content

spack audit: add test for package detection#28092

Closed
alalazo wants to merge 1 commit intospack:developfrom
alalazo:features/audit_externals
Closed

spack audit: add test for package detection#28092
alalazo wants to merge 1 commit intospack:developfrom
alalazo:features/audit_externals

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Dec 20, 2021

closes #21343
closes #18175

This PR adds a new type of audit, triggered by:

$ spack audit externals

that 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 externals will 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 in package.py as 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)

@spackbot-app spackbot-app bot added commands documentation Improvements or additions to documentation workflow labels Dec 20, 2021
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.
@alalazo alalazo force-pushed the features/audit_externals branch from 58f7e24 to 113a740 Compare December 20, 2021 17:13
@alalazo alalazo marked this pull request as ready for review December 20, 2021 21:12
@alalazo alalazo requested a review from becker33 December 20, 2021 21:12
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Dec 21, 2021

For reviewer's reference, here's how it would look like if we move metadata to a dict literal in package.py #21343 (review)

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented May 16, 2022

Closing according to this #18175 (comment)

@alalazo alalazo closed this May 16, 2022
@alalazo alalazo deleted the features/audit_externals branch May 16, 2022 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands documentation Improvements or additions to documentation workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant