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.
This commit is contained in:
		 Massimiliano Culpo
					Massimiliano Culpo
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							8ad05d6a74
						
					
				
				
					commit
					32f1aa607c
				
			| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user