From e5d87b711da4527870830734c6df8f473c2653ae Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 6 May 2021 16:30:02 +0200 Subject: Reduce visual noise during distributed build (#23338) --- lib/spack/spack/installer.py | 4 ++-- lib/spack/spack/test/installer.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index c19ee9aff8..4ee56db26d 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -1276,8 +1276,8 @@ class PackageInstaller(object): task (BuildTask): the installation build task for a package """ if task.status not in [STATUS_INSTALLED, STATUS_INSTALLING]: - tty.msg('{0} {1}'.format(install_msg(task.pkg_id, self.pid), - 'in progress by another process')) + tty.debug('{0} {1}'.format(install_msg(task.pkg_id, self.pid), + 'in progress by another process')) new_task = task.next_attempt(self.installed) new_task.status = STATUS_INSTALLING diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 840d4bfa7d..861b0db8df 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -777,7 +777,11 @@ def test_requeue_task(install_mockery, capfd): installer = create_installer(const_arg) task = create_build_task(installer.build_requests[0].pkg) + # temporarily set tty debug messages on so we can test output + current_debug_level = tty.debug_level() + tty.set_debug(1) installer._requeue_task(task) + tty.set_debug(current_debug_level) ids = list(installer.build_tasks) assert len(ids) == 1 @@ -786,7 +790,7 @@ def test_requeue_task(install_mockery, capfd): assert qtask.sequence > task.sequence assert qtask.attempts == task.attempts + 1 - out = capfd.readouterr()[0] + out = capfd.readouterr()[1] assert 'Installing a' in out assert ' in progress by another process' in out -- cgit v1.2.3-60-g2f50