Merge #646 `ostree-installer: Clean up output dir`

This commit is contained in:
Dennis Gilmore 2017-06-20 15:31:09 +00:00
commit 65b75e7049
2 changed files with 6 additions and 3 deletions

View File

@ -127,7 +127,7 @@ class OstreeInstallerThread(WorkerThread):
def _run_ostree_cmd(self, compose, variant, arch, config, source_repo, output_dir, volid):
lorax_wrapper = lorax.LoraxWrapper()
cmd = lorax_wrapper.get_lorax_cmd(
lorax_cmd = lorax_wrapper.get_lorax_cmd(
compose.conf['release_name'],
compose.conf["release_version"],
self._get_release(compose, config),
@ -145,6 +145,8 @@ class OstreeInstallerThread(WorkerThread):
is_final=compose.supported,
log_dir=self.logdir,
)
cmd = 'rm -rf %s && %s' % (pipes.quote(output_dir),
' '.join([pipes.quote(x) for x in lorax_cmd]))
runroot_channel = compose.conf.get("runroot_channel")
runroot_tag = compose.conf["runroot_tag"]

View File

@ -97,11 +97,12 @@ class OstreeThreadTest(helpers.PungiTestCase):
if extra:
lorax_cmd.extend(extra)
lorax_cmd.append(self.topdir + '/work/x86_64/Everything/ostree_installer')
outdir = self.topdir + '/work/x86_64/Everything/ostree_installer'
lorax_cmd.append(outdir)
self.assertEqual(koji.get_runroot_cmd.call_args_list,
[mock.call('rrt', 'x86_64',
lorax_cmd,
'rm -rf %s && %s' % (outdir, ' '.join(lorax_cmd)),
channel=None, mounts=[self.topdir],
packages=['pungi', 'lorax', 'ostree'],
task_id=True, use_shell=True, weight=weight)])