demote warning for no source id to debug message (#33657)
* demote warning for no source id to debug message
This commit is contained in:
parent
53fbaa5dcd
commit
912d544afe
@ -1647,7 +1647,7 @@ def content_hash(self, content=None):
|
||||
from_local_sources = env and env.is_develop(self.spec)
|
||||
if self.has_code and not self.spec.external and not from_local_sources:
|
||||
message = "Missing a source id for {s.name}@{s.version}"
|
||||
tty.warn(message.format(s=self))
|
||||
tty.debug(message.format(s=self))
|
||||
hash_content.append("".encode("utf-8"))
|
||||
else:
|
||||
hash_content.append(source_id.encode("utf-8"))
|
||||
|
@ -591,6 +591,16 @@ def linux_os():
|
||||
return LinuxOS(name=name, version=version)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ensure_debug(monkeypatch):
|
||||
current_debug_level = tty.debug_level()
|
||||
tty.set_debug(1)
|
||||
|
||||
yield
|
||||
|
||||
tty.set_debug(current_debug_level)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=is_windows, scope="session")
|
||||
def platform_config():
|
||||
spack.config.add_default_platform_scope(spack.platforms.real_host().name)
|
||||
|
@ -429,7 +429,7 @@ def test_uninstall_by_spec_errors(mutable_database):
|
||||
|
||||
|
||||
@pytest.mark.disable_clean_stage_check
|
||||
def test_nosource_pkg_install(install_mockery, mock_fetch, mock_packages, capfd):
|
||||
def test_nosource_pkg_install(install_mockery, mock_fetch, mock_packages, capfd, ensure_debug):
|
||||
"""Test install phases with the nosource package."""
|
||||
spec = Spec("nosource").concretized()
|
||||
pkg = spec.package
|
||||
@ -444,7 +444,9 @@ def test_nosource_pkg_install(install_mockery, mock_fetch, mock_packages, capfd)
|
||||
|
||||
|
||||
@pytest.mark.disable_clean_stage_check
|
||||
def test_nosource_bundle_pkg_install(install_mockery, mock_fetch, mock_packages, capfd):
|
||||
def test_nosource_bundle_pkg_install(
|
||||
install_mockery, mock_fetch, mock_packages, capfd, ensure_debug
|
||||
):
|
||||
"""Test install phases with the nosource-bundle package."""
|
||||
spec = Spec("nosource-bundle").concretized()
|
||||
pkg = spec.package
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
import pytest
|
||||
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.install_test
|
||||
import spack.spec
|
||||
|
||||
@ -20,16 +18,6 @@ def _true(*args, **kwargs):
|
||||
return True
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def ensure_debug(monkeypatch):
|
||||
current_debug_level = tty.debug_level()
|
||||
tty.set_debug(1)
|
||||
|
||||
yield
|
||||
|
||||
tty.set_debug(current_debug_level)
|
||||
|
||||
|
||||
def ensure_results(filename, expected):
|
||||
assert os.path.exists(filename)
|
||||
with open(filename, "r") as fd:
|
||||
|
Loading…
Reference in New Issue
Block a user