From 99ba36990115c327c3c500d1b5489d95a121695a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 9 Nov 2016 09:00:33 +0100 Subject: [PATCH] ostree-installer: Capture all lorax logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #457 Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree_installer.py | 1 + tests/test_ostree_installer_phase.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index 521a442b..6b0f6708 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -153,6 +153,7 @@ class OstreeInstallerThread(WorkerThread): add_template_var=config.get('add_template_var'), add_arch_template_var=config.get('add_arch_template_var'), is_final=compose.supported, + log_dir=self.logdir, ) runroot_channel = compose.conf.get("runroot_channel") diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index 6cbc8539..ad7ee2fc 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -138,7 +138,8 @@ class OstreeThreadTest(helpers.PungiTestCase): self.assertRunrootCall(koji, 'file://%s/compose/Everything/x86_64/os' % self.topdir, - cfg['release']) + cfg['release'], + extra=['--logfile=%s/logs/x86_64/ostree_installer/lorax.log' % self.topdir]) self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path) self.assertImageAdded(self.compose, ImageCls, iso) self.assertAllCopied(run) @@ -171,7 +172,8 @@ class OstreeThreadTest(helpers.PungiTestCase): t.process((self.compose, self.compose.variants['Everything'], 'x86_64', cfg), 1) - self.assertRunrootCall(koji, 'http://example.com/repo/x86_64/', cfg['release'], isfinal=True) + self.assertRunrootCall(koji, 'http://example.com/repo/x86_64/', cfg['release'], isfinal=True, + extra=['--logfile=%s/logs/x86_64/ostree_installer/lorax.log' % self.topdir]) self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path) self.assertImageAdded(self.compose, ImageCls, iso) self.assertAllCopied(run) @@ -252,7 +254,8 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg['release'], isfinal=True, extra=['--add-template=%s/some_file.txt' % templ_dir, - '--add-arch-template=%s/other_file.txt' % templ_dir]) + '--add-arch-template=%s/other_file.txt' % templ_dir, + '--logfile=%s/logs/x86_64/ostree_installer/lorax.log' % self.topdir]) self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path) self.assertImageAdded(self.compose, ImageCls, iso) self.assertAllCopied(run) @@ -309,7 +312,8 @@ class OstreeThreadTest(helpers.PungiTestCase): '--add-template-var=ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host', '--add-arch-template-var=ostree_repo=https://kojipkgs.fedoraproject.org/compose/atomic/Rawhide/', '--add-arch-template-var=ostree_osname=fedora-atomic', - '--add-arch-template-var=ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host'] + '--add-arch-template-var=ostree_ref=fedora-atomic/Rawhide/x86_64/docker-host', + '--logfile=%s/logs/x86_64/ostree_installer/lorax.log' % self.topdir] ) self.assertIsoLinked(link, get_file_size, get_mtime, final_iso_path) self.assertImageAdded(self.compose, ImageCls, iso)