summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2018-05-05 17:26:47 -0500
committerGitHub <noreply@github.com>2018-05-05 17:26:47 -0500
commit5af4d4f0acc1b7e4b77109d18b242bdabea3c0f8 (patch)
tree4f2c267f49434e42186f0f3fea9ffe960ca04eae
parente499a4d071c41baaad84f6d1bb9416d4815764c6 (diff)
downloadspack-5af4d4f0acc1b7e4b77109d18b242bdabea3c0f8.tar.gz
spack-5af4d4f0acc1b7e4b77109d18b242bdabea3c0f8.tar.bz2
spack-5af4d4f0acc1b7e4b77109d18b242bdabea3c0f8.tar.xz
spack-5af4d4f0acc1b7e4b77109d18b242bdabea3c0f8.zip
Set default provider for every virtual package (#7784)
* Set default provider for every virtual package * Add unit test to ensure that every virtual package has a default provider explicitly set
-rw-r--r--etc/spack/defaults/packages.yaml3
-rw-r--r--lib/spack/spack/test/package_sanity.py10
2 files changed, 12 insertions, 1 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml
index 5e030a873f..e760158554 100644
--- a/etc/spack/defaults/packages.yaml
+++ b/etc/spack/defaults/packages.yaml
@@ -17,6 +17,7 @@ packages:
all:
compiler: [gcc, intel, pgi, clang, xl, nag]
providers:
+ D: [ldc]
awk: [gawk]
blas: [openblas]
daal: [intel-daal]
@@ -26,6 +27,7 @@ packages:
golang: [gcc]
ipp: [intel-ipp]
java: [jdk]
+ jpeg: [libjpeg-turbo, libjpeg]
lapack: [openblas]
mkl: [intel-mkl]
mpe: [mpe2]
@@ -37,4 +39,3 @@ packages:
scalapack: [netlib-scalapack]
szip: [libszip, libaec]
tbb: [intel-tbb]
- jpeg: [libjpeg-turbo, libjpeg]
diff --git a/lib/spack/spack/test/package_sanity.py b/lib/spack/spack/test/package_sanity.py
index 65861273cd..fc27f831c3 100644
--- a/lib/spack/spack/test/package_sanity.py
+++ b/lib/spack/spack/test/package_sanity.py
@@ -60,3 +60,13 @@ def test_all_versions_are_lowercase():
errors.append(name)
assert len(errors) == 0
+
+
+def test_all_virtual_packages_have_default_providers():
+ """All virtual packages must have a default provider explicitly set."""
+ defaults = spack.config.get_config('packages', scope='defaults')
+ default_providers = defaults['all']['providers']
+ providers = spack.repo.provider_index.providers
+
+ for provider in providers:
+ assert provider in default_providers