Merge #646 `ostree-installer: Clean up output dir`
This commit is contained in:
commit
65b75e7049
|
@ -127,7 +127,7 @@ class OstreeInstallerThread(WorkerThread):
|
||||||
|
|
||||||
def _run_ostree_cmd(self, compose, variant, arch, config, source_repo, output_dir, volid):
|
def _run_ostree_cmd(self, compose, variant, arch, config, source_repo, output_dir, volid):
|
||||||
lorax_wrapper = lorax.LoraxWrapper()
|
lorax_wrapper = lorax.LoraxWrapper()
|
||||||
cmd = lorax_wrapper.get_lorax_cmd(
|
lorax_cmd = lorax_wrapper.get_lorax_cmd(
|
||||||
compose.conf['release_name'],
|
compose.conf['release_name'],
|
||||||
compose.conf["release_version"],
|
compose.conf["release_version"],
|
||||||
self._get_release(compose, config),
|
self._get_release(compose, config),
|
||||||
|
@ -145,6 +145,8 @@ class OstreeInstallerThread(WorkerThread):
|
||||||
is_final=compose.supported,
|
is_final=compose.supported,
|
||||||
log_dir=self.logdir,
|
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_channel = compose.conf.get("runroot_channel")
|
||||||
runroot_tag = compose.conf["runroot_tag"]
|
runroot_tag = compose.conf["runroot_tag"]
|
||||||
|
|
|
@ -97,11 +97,12 @@ class OstreeThreadTest(helpers.PungiTestCase):
|
||||||
if extra:
|
if extra:
|
||||||
lorax_cmd.extend(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,
|
self.assertEqual(koji.get_runroot_cmd.call_args_list,
|
||||||
[mock.call('rrt', 'x86_64',
|
[mock.call('rrt', 'x86_64',
|
||||||
lorax_cmd,
|
'rm -rf %s && %s' % (outdir, ' '.join(lorax_cmd)),
|
||||||
channel=None, mounts=[self.topdir],
|
channel=None, mounts=[self.topdir],
|
||||||
packages=['pungi', 'lorax', 'ostree'],
|
packages=['pungi', 'lorax', 'ostree'],
|
||||||
task_id=True, use_shell=True, weight=weight)])
|
task_id=True, use_shell=True, weight=weight)])
|
||||||
|
|
Loading…
Reference in New Issue