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