diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-10-12 20:59:50 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-11-17 10:04:13 -0800 |
commit | 67344326c36b4dc5377986347a8ff43eeee970d7 (patch) | |
tree | da1d6e629b26d716a7405ea917935ace0e78f4c9 | |
parent | d4b83daa48a5d6fcf03e298dc6351b54a46a5b2c (diff) | |
download | spack-67344326c36b4dc5377986347a8ff43eeee970d7.tar.gz spack-67344326c36b4dc5377986347a8ff43eeee970d7.tar.bz2 spack-67344326c36b4dc5377986347a8ff43eeee970d7.tar.xz spack-67344326c36b4dc5377986347a8ff43eeee970d7.zip |
concretizer: fixed test on compiler preferences
-rw-r--r-- | lib/spack/spack/solver/asp.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/solver/concretize.lp | 2 | ||||
-rw-r--r-- | lib/spack/spack/test/concretize_preferences.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index b16a6d14ab..448291cd29 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -790,7 +790,7 @@ class SpackSolverSetup(object): """Facts about packages' compiler prefs.""" packages = spack.config.get("packages") - pkg_prefs = packages.get(pkg) + pkg_prefs = packages.get(pkg.name) if not pkg_prefs or "compiler" not in pkg_prefs: return diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index be1bd0ccc6..22bb1dff3f 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -310,7 +310,7 @@ compiler_version_match(Package, 1) #defined compiler_supports_os/3. #defined allow_compiler/2. -% compilers weighted by preference acccording to packages.yaml +% compilers weighted by preference according to packages.yaml compiler_weight(Package, Weight) :- node_compiler(Package, Compiler), node_compiler_version(Package, Compiler, V), diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index 4d9cc9412b..8de8773eb0 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -112,7 +112,7 @@ class TestConcretizePreferences(object): # Try the last available compiler compiler = str(compiler_list[-1]) update_packages('mpileaks', 'compiler', [compiler]) - spec = concretize('mpileaks os=redhat6 target=x86') + spec = concretize('mpileaks os=redhat6') assert spec.compiler == spack.spec.CompilerSpec(compiler) def test_preferred_target(self, mutable_mock_repo): |