diff --git a/pungi/util.py b/pungi/util.py index 78a9c9be..cef70e4a 100644 --- a/pungi/util.py +++ b/pungi/util.py @@ -500,9 +500,9 @@ def log_failed_task(compose, variant, arch, deliverable, subvariant, logger=None ident = 'variant %s, arch %s' % (variant.uid if variant else 'None', arch) if subvariant: ident += ', subvariant %s' % subvariant - logger.info('[FAIL] %s (%s) failed, but going on anyway.' % (msg, ident)) + logger.error('[FAIL] %s (%s) failed, but going on anyway.' % (msg, ident)) if exc: - logger.info(str(exc)) + logger.error(str(exc)) tb = traceback.format_exc() logger.debug(tb) diff --git a/tests/test_buildinstall.py b/tests/test_buildinstall.py index c930f589..648a03f8 100644 --- a/tests/test_buildinstall.py +++ b/tests/test_buildinstall.py @@ -826,7 +826,7 @@ class BuildinstallThreadTestCase(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, 'x86_64', None, self.cmd), 0) - compose._logger.info.assert_has_calls([ + compose._logger.error.assert_has_calls([ mock.call('[FAIL] Buildinstall (variant None, arch x86_64) failed, but going on anyway.'), mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall.x86_64.log for more details.' % self.topdir) @@ -861,7 +861,7 @@ class BuildinstallThreadTestCase(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, 'x86_64', compose.variants['Server'], self.cmd), 0) - compose._logger.info.assert_has_calls([ + compose._logger.error.assert_has_calls([ mock.call('[FAIL] Buildinstall (variant Server, arch x86_64) failed, but going on anyway.'), mock.call('Runroot task failed: 1234. See %s/logs/x86_64/buildinstall-Server.x86_64.log for more details.' % self.topdir) ]) diff --git a/tests/test_createiso_phase.py b/tests/test_createiso_phase.py index 4714482c..474ee154 100644 --- a/tests/test_createiso_phase.py +++ b/tests/test_createiso_phase.py @@ -536,7 +536,7 @@ class CreateisoThreadTest(helpers.PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'), mock.call('BOOM') ]) @@ -579,7 +579,7 @@ class CreateisoThreadTest(helpers.PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'), mock.call('Runroot task failed: 1234. See %s for more details.' % (self.topdir + '/logs/x86_64/createiso-image-name.x86_64.log')) @@ -660,7 +660,7 @@ class CreateisoThreadTest(helpers.PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd, compose.variants['Server'], 'x86_64'), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Iso (variant Server, arch x86_64) failed, but going on anyway.'), mock.call('BOOM') ]) diff --git a/tests/test_imagebuildphase.py b/tests/test_imagebuildphase.py index 019935c1..d07364c8 100644 --- a/tests/test_imagebuildphase.py +++ b/tests/test_imagebuildphase.py @@ -883,7 +883,7 @@ class TestCreateImageBuildThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'), mock.call('ImageBuild task failed: 1234. See %s for more details.' % (os.path.join(self.topdir, @@ -927,7 +927,7 @@ class TestCreateImageBuildThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Image build (variant Client, arch *, subvariant Client) failed, but going on anyway.'), mock.call('BOOM'), ]) diff --git a/tests/test_liveimagesphase.py b/tests/test_liveimagesphase.py index 900753ce..09718ac5 100644 --- a/tests/test_liveimagesphase.py +++ b/tests/test_liveimagesphase.py @@ -739,7 +739,7 @@ class TestCreateLiveImageThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'), mock.call('LiveImage task failed: 123. See %s/logs/amd64/liveimage-None-None-xyz.amd64.log for more details.' % self.topdir) @@ -779,7 +779,7 @@ class TestCreateLiveImageThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, cmd, compose.variants['Client'], 'amd64'), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Live (variant Client, arch amd64, subvariant Client) failed, but going on anyway.'), mock.call('BOOM') ]) diff --git a/tests/test_livemediaphase.py b/tests/test_livemediaphase.py index af3f7452..f05e8fd1 100644 --- a/tests/test_livemediaphase.py +++ b/tests/test_livemediaphase.py @@ -560,7 +560,7 @@ class TestLiveMediaThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, compose.variants['Server'], config), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'), mock.call('Live media task failed: 1234. See %s for more details.' % (os.path.join(self.topdir, 'logs/amd64-x86_64/livemedia-Server-KDE.amd64-x86_64.log'))) @@ -619,7 +619,7 @@ class TestLiveMediaThread(PungiTestCase): with mock.patch('time.sleep'): t.process((compose, compose.variants['Server'], config), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Live media (variant Server, arch *, subvariant KDE) failed, but going on anyway.'), mock.call('BOOM') ]) diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index 7569e348..80e68d42 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -588,7 +588,7 @@ class OstreeThreadTest(helpers.PungiTestCase): t = ostree.OstreeInstallerThread(pool) t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'), mock.call('BOOM') ]) @@ -618,7 +618,7 @@ class OstreeThreadTest(helpers.PungiTestCase): t = ostree.OstreeInstallerThread(pool) t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1) - pool._logger.info.assert_has_calls([ + pool._logger.error.assert_has_calls([ mock.call('[FAIL] Ostree installer (variant Everything, arch x86_64) failed, but going on anyway.'), mock.call('Runroot task failed: 1234. See %s/%s/runroot.log for more details.' % (self.topdir, LOG_PATH)) diff --git a/tests/test_ostree_phase.py b/tests/test_ostree_phase.py index ad14eca4..c2986bc8 100644 --- a/tests/test_ostree_phase.py +++ b/tests/test_ostree_phase.py @@ -227,7 +227,7 @@ class OSTreeThreadTest(helpers.PungiTestCase): t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1) - self.compose._logger.info.assert_has_calls([ + self.compose._logger.error.assert_has_calls([ mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'), mock.call('Runroot task failed: 1234. See %s for more details.' % (self.topdir + '/logs/x86_64/Everything/ostree-1/runroot.log')) @@ -246,7 +246,7 @@ class OSTreeThreadTest(helpers.PungiTestCase): t.process((self.compose, self.compose.variants['Everything'], 'x86_64', self.cfg), 1) - self.compose._logger.info.assert_has_calls([ + self.compose._logger.error.assert_has_calls([ mock.call('[FAIL] Ostree (variant Everything, arch x86_64) failed, but going on anyway.'), mock.call('BOOM') ])