summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2022-11-04 14:52:58 -0700
committerGitHub <noreply@github.com>2022-11-04 21:52:58 +0000
commit912d544afeb24876af87757ccf99c70306f104b4 (patch)
treee3979cc53bac8c8559da4de6691141d4b16f035a /lib
parent53fbaa5dcded49d4fa04ee307813071873dab4f3 (diff)
downloadspack-912d544afeb24876af87757ccf99c70306f104b4.tar.gz
spack-912d544afeb24876af87757ccf99c70306f104b4.tar.bz2
spack-912d544afeb24876af87757ccf99c70306f104b4.tar.xz
spack-912d544afeb24876af87757ccf99c70306f104b4.zip
demote warning for no source id to debug message (#33657)
* demote warning for no source id to debug message
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package_base.py2
-rw-r--r--lib/spack/spack/test/conftest.py10
-rw-r--r--lib/spack/spack/test/install.py6
-rw-r--r--lib/spack/spack/test/test_suite.py12
4 files changed, 15 insertions, 15 deletions
diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py
index 1871e6785b..e0e250cf7c 100644
--- a/lib/spack/spack/package_base.py
+++ b/lib/spack/spack/package_base.py
@@ -1647,7 +1647,7 @@ class PackageBase(six.with_metaclass(PackageMeta, WindowsRPathMeta, PackageViewM
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"))
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index 2f04e1d4fd..2ab8c89c3b 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -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)
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py
index e8b6f415d3..da54216402 100644
--- a/lib/spack/spack/test/install.py
+++ b/lib/spack/spack/test/install.py
@@ -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
diff --git a/lib/spack/spack/test/test_suite.py b/lib/spack/spack/test/test_suite.py
index 3d8ebace39..7db59526ca 100644
--- a/lib/spack/spack/test/test_suite.py
+++ b/lib/spack/spack/test/test_suite.py
@@ -7,8 +7,6 @@ import sys
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: