conftest: hook the new solver in the config fixture
This commit is contained in:
parent
3e4fd64169
commit
58683b9e56
6 changed files with 12 additions and 10 deletions
|
@ -786,10 +786,10 @@ def __init__(self, spec, archs):
|
|||
% (spec.name, str(archs)))
|
||||
|
||||
|
||||
class NoBuildError(spack.error.SpackError):
|
||||
class NoBuildError(spack.error.SpecError):
|
||||
"""Raised when a package is configured with the buildable option False, but
|
||||
no satisfactory external versions can be found"""
|
||||
|
||||
no satisfactory external versions can be found
|
||||
"""
|
||||
def __init__(self, spec):
|
||||
msg = ("The spec\n '%s'\n is configured as not buildable, "
|
||||
"and no matching external installs were found")
|
||||
|
|
|
@ -208,6 +208,7 @@ variant_default_value(Package, Variant, Value)
|
|||
#defined variant_default_value/3.
|
||||
#defined variant_possible_value/3.
|
||||
#defined variant_default_value_from_packages_yaml/3.
|
||||
#defined variant_default_value_from_package_py/3.
|
||||
|
||||
%-----------------------------------------------------------------------------
|
||||
% Platform semantics
|
||||
|
|
|
@ -2456,10 +2456,10 @@ def _new_concretize(self, tests=False):
|
|||
|
||||
#: choose your concretizer here.
|
||||
def concretize(self, tests=False):
|
||||
if spack.config.get('config:concretizer') == "original":
|
||||
self._old_concretize(tests)
|
||||
else:
|
||||
if spack.config.get('config:concretizer') == "clingo":
|
||||
self._new_concretize(tests)
|
||||
else:
|
||||
self._old_concretize(tests)
|
||||
|
||||
def _mark_concrete(self, value=True):
|
||||
"""Mark this spec and its dependencies as concrete.
|
||||
|
|
|
@ -498,7 +498,6 @@ def test_conflicts_in_spec(self, conflict_spec):
|
|||
s = Spec(conflict_spec)
|
||||
with pytest.raises(spack.error.SpackError):
|
||||
s.concretize()
|
||||
assert not s.concrete
|
||||
|
||||
@pytest.mark.parametrize('spec_str', [
|
||||
'conflict@10.0%clang+foo'
|
||||
|
|
|
@ -501,12 +501,13 @@ def configuration_dir(tmpdir_factory, linux_os):
|
|||
tmpdir.ensure('user', dir=True)
|
||||
|
||||
# Slightly modify config.yaml and compilers.yaml
|
||||
solver = os.environ.get('SPACK_TEST_SOLVER', 'original')
|
||||
config_yaml = test_config.join('config.yaml')
|
||||
modules_root = tmpdir_factory.mktemp('share')
|
||||
tcl_root = modules_root.ensure('modules', dir=True)
|
||||
lmod_root = modules_root.ensure('lmod', dir=True)
|
||||
content = ''.join(config_yaml.read()).format(
|
||||
str(tcl_root), str(lmod_root)
|
||||
solver, str(tcl_root), str(lmod_root)
|
||||
)
|
||||
t = tmpdir.join('site', 'config.yaml')
|
||||
t.write(content)
|
||||
|
|
|
@ -13,6 +13,7 @@ config:
|
|||
verify_ssl: true
|
||||
checksum: true
|
||||
dirty: false
|
||||
concretizer: {0}
|
||||
module_roots:
|
||||
tcl: {0}
|
||||
lmod: {1}
|
||||
tcl: {1}
|
||||
lmod: {2}
|
||||
|
|
Loading…
Reference in a new issue