diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-05-06 16:30:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 07:30:02 -0700 |
commit | e5d87b711da4527870830734c6df8f473c2653ae (patch) | |
tree | 28fb86261e119d1afe4c794e42b6f4da0a27b3e9 /lib | |
parent | dfcd01f2c7ebbd0c1ac214c5c73ebc00b46d930d (diff) | |
download | spack-e5d87b711da4527870830734c6df8f473c2653ae.tar.gz spack-e5d87b711da4527870830734c6df8f473c2653ae.tar.bz2 spack-e5d87b711da4527870830734c6df8f473c2653ae.tar.xz spack-e5d87b711da4527870830734c6df8f473c2653ae.zip |
Reduce visual noise during distributed build (#23338)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/installer.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/installer.py | 6 |
2 files changed, 7 insertions, 3 deletions
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 |