diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2021-06-18 15:52:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 07:52:08 -0600 |
commit | 32f1aa607c9536709442c44547b31ff316e3730b (patch) | |
tree | 3dadebf576a3a23e878a4b3b2486a94bba9aead8 /share | |
parent | 8ad05d6a74ba8c1e718b51b7b3b1cd43d484d7e6 (diff) | |
download | spack-32f1aa607c9536709442c44547b31ff316e3730b.tar.gz spack-32f1aa607c9536709442c44547b31ff316e3730b.tar.bz2 spack-32f1aa607c9536709442c44547b31ff316e3730b.tar.xz spack-32f1aa607c9536709442c44547b31ff316e3730b.zip |
Add an audit system to Spack (#23053)
Add a new "spack audit" command. This command can check for issues
with configuration or with packages and is intended to help a
user debug a failed Spack build.
In some cases the reported issues are always errors but are too
costly to check for (e.g. packages that specify missing variants on
dependencies). In other cases the issues may be legitimate but
uncommon usage of Spack and we want to be sure the user intended the
behavior (e.g. duplicate compiler definitions).
Audits are grouped by theme, and for now the two themes are packages
and configuration. For example you can run all available audits
on packages with "spack audit packages". It is intended that in
the future users will be able to define their own audits.
The package audits are good candidates for running in package_sanity
(i.e. they could catch bugs in user-submitted packages before they
are merged) but that is left for a later PR.
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/spack-completion.bash | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 26dd77aeed..08a4c999c9 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -333,7 +333,7 @@ _spack() { then SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -p --profile --sorted-profile --lines -v --verbose --stacktrace -V --version --print-shell-vars" else - SPACK_COMPREPLY="activate add analyze arch blame build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mark mirror module monitor patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style test test-env tutorial undevelop uninstall unit-test unload url verify versions view" + SPACK_COMPREPLY="activate add analyze arch audit blame build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mark mirror module monitor patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style test test-env tutorial undevelop uninstall unit-test unload url verify versions view" fi } @@ -381,6 +381,32 @@ _spack_arch() { SPACK_COMPREPLY="-h --help --known-targets -p --platform -o --operating-system -t --target -f --frontend -b --backend" } +_spack_audit() { + if $list_options + then + SPACK_COMPREPLY="-h --help" + else + SPACK_COMPREPLY="configs packages list" + fi +} + +_spack_audit_configs() { + SPACK_COMPREPLY="-h --help" +} + +_spack_audit_packages() { + if $list_options + then + SPACK_COMPREPLY="-h --help" + else + SPACK_COMPREPLY="" + fi +} + +_spack_audit_list() { + SPACK_COMPREPLY="-h --help" +} + _spack_blame() { if $list_options then |