From 8799d4cd85a3ff3fc70b7959cf65b0b686249d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 8 Apr 2016 10:58:46 +0200 Subject: [PATCH] [ostree-installer] Use separate directory for logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree_installer.py | 2 +- tests/test_ostree_installer_phase.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index df6096d7..816b4440 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -46,7 +46,7 @@ class OstreeInstallerThread(WorkerThread): def worker(self, compose, variant, arch, config): msg = 'Ostree phase for variant %s, arch %s' % (variant.uid, arch) self.pool.log_info('[BEGIN] %s' % msg) - self.logdir = compose.paths.log.topdir('{}/ostree'.format(arch)) + self.logdir = compose.paths.log.topdir('{}/ostree_installer'.format(arch)) source_variant = compose.variants[config['source_repo_from']] source_repo = translate_path( diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index 21fd3d51..65b161ea 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -149,7 +149,7 @@ class OstreeThreadTest(helpers.PungiTestCase): task_id=True, use_shell=True)]) self.assertEqual(koji.run_runroot_cmd.call_args_list, [mock.call(koji.get_runroot_cmd.return_value, - log_file=self.topdir + '/logs/x86_64/ostree/runroot.log')]) + log_file=self.topdir + '/logs/x86_64/ostree_installer/runroot.log')]) self.assertEqual(link.call_args_list, [mock.call(self.topdir + '/work/x86_64/Everything/ostree_installer/images/boot.iso', final_iso_path)]) @@ -230,7 +230,7 @@ class OstreeThreadTest(helpers.PungiTestCase): task_id=True, use_shell=True)]) self.assertEqual(koji.run_runroot_cmd.call_args_list, [mock.call(koji.get_runroot_cmd.return_value, - log_file=self.topdir + '/logs/x86_64/ostree/runroot.log')]) + log_file=self.topdir + '/logs/x86_64/ostree_installer/runroot.log')]) self.assertEqual(link.call_args_list, [mock.call(self.topdir + '/work/x86_64/Everything/ostree_installer/images/boot.iso', final_iso_path)]) @@ -310,7 +310,7 @@ class OstreeThreadTest(helpers.PungiTestCase): t.process((compose, compose.variants['Everything'], 'x86_64', cfg), 1) compose.log_info.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/logs/x86_64/ostree/runroot.log for more details.' + mock.call('Runroot task failed: 1234. See %s/logs/x86_64/ostree_installer/runroot.log for more details.' % self.topdir) ])