tests: add checks and tests for consistent version() arguments

- Previously, Spack didn't check the arguments you put in version()
  directives.

- So, you could do something like this, where there are arguments for a
  URL fetcher AND for a git fetcher:

  version('1.0', md5='abc123', git='https://foo.bar', commit='feda2343')

- Now, we check the arguments before constructing a fetcher, to ensure
  that each package has *only* arguments for a single type of fetcher.

- Also added `test_package_version_consistency()` to the `package_sanity`
  test, so that all builtin packages are required to have valid
  `version()` directives.
This commit is contained in:
Todd Gamblin
2018-07-22 16:15:37 -07:00
parent 6f7eaecfa0
commit 020c34e136
10 changed files with 91 additions and 32 deletions

View File

@@ -32,11 +32,11 @@ class Nekbone(Package):
the spectral element method."""
homepage = "https://github.com/Nek5000/Nekbone"
url = "https://github.com/Nek5000/Nekbone/tarball/v17.0"
url = "https://github.com/Nek5000/Nekbone/archive/v17.0.tar.gz"
tags = ['proxy-app', 'ecp-proxy-app']
version('17.0', 'cc339684547614a0725959e41839fec1', git='https://github.com/Nek5000/Nekbone.git')
version('17.0', sha256='ae361cc61368a924398a28a296f675b7f0c4a9516788a7f8fa3c09d787cdf69b')
version('develop', git='https://github.com/Nek5000/Nekbone.git')
# Variants