extra-iso: Generate jigdo by default
It can be turned off by the same option that is used in createiso phase. JIRA: COMPOSE-2962 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
0c8702cd6d
commit
740df1bc6c
@ -97,6 +97,10 @@ class ExtraIsosThread(WorkerThread):
|
||||
arch=arch,
|
||||
supported=compose.supported,
|
||||
)
|
||||
if compose.conf['create_jigdo']:
|
||||
jigdo_dir = compose.paths.compose.jigdo_dir(arch, variant)
|
||||
os_tree = compose.paths.compose.os_tree(arch, variant)
|
||||
opts = opts._replace(jigdo_dir=jigdo_dir, os_tree=os_tree)
|
||||
|
||||
if bootable:
|
||||
opts = opts._replace(buildinstall_method=compose.conf['buildinstall_method'])
|
||||
@ -110,7 +114,7 @@ class ExtraIsosThread(WorkerThread):
|
||||
['bash', script_file], [compose.topdir],
|
||||
log_file=compose.paths.log.log_file(
|
||||
arch, "extraiso-%s" % os.path.basename(iso_path)),
|
||||
with_jigdo=False)
|
||||
with_jigdo=compose.conf['create_jigdo'])
|
||||
|
||||
add_iso_to_metadata(
|
||||
compose,
|
||||
|
@ -122,6 +122,49 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
gvi.return_value = 'my volume id'
|
||||
gic.return_value = '/tmp/iso-graft-points'
|
||||
|
||||
t = extra_isos.ExtraIsosThread(mock.Mock())
|
||||
with mock.patch('time.sleep'):
|
||||
t.process((compose, cfg, server, 'x86_64'), 1)
|
||||
|
||||
self.assertEqual(gfn.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64', None)])
|
||||
self.assertEqual(gvi.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64', [])])
|
||||
self.assertEqual(gef.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64', [])])
|
||||
self.assertEqual(gic.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64', ['Client'], 'my.iso', True)])
|
||||
self.assertEqual(
|
||||
rcc.call_args_list,
|
||||
[mock.call(False, 1, compose, True, 'x86_64',
|
||||
['bash', os.path.join(self.topdir, 'work/x86_64/tmp-Server/extraiso-my.iso.sh')],
|
||||
[self.topdir],
|
||||
log_file=os.path.join(self.topdir, 'logs/x86_64/extraiso-my.iso.x86_64.log'),
|
||||
with_jigdo=True)]
|
||||
|
||||
)
|
||||
self.assertEqual(
|
||||
aitm.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64',
|
||||
os.path.join(self.topdir, 'compose/Server/x86_64/iso/my.iso'),
|
||||
True, additional_variants=["Client"])]
|
||||
)
|
||||
|
||||
def test_binary_bootable_image_without_jigdo(self, aitm, rcc, gef, gic, gfn, gvi):
|
||||
compose = helpers.DummyCompose(self.topdir, {
|
||||
'bootable': True,
|
||||
'buildinstall_method': 'lorax',
|
||||
'create_jigdo': False,
|
||||
})
|
||||
server = compose.variants['Server']
|
||||
cfg = {
|
||||
'include_variants': ['Client'],
|
||||
}
|
||||
|
||||
gfn.return_value = 'my.iso'
|
||||
gvi.return_value = 'my volume id'
|
||||
gic.return_value = '/tmp/iso-graft-points'
|
||||
|
||||
t = extra_isos.ExtraIsosThread(mock.Mock())
|
||||
with mock.patch('time.sleep'):
|
||||
t.process((compose, cfg, server, 'x86_64'), 1)
|
||||
@ -181,7 +224,7 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
['bash', os.path.join(self.topdir, 'work/x86_64/tmp-Server/extraiso-my.iso.sh')],
|
||||
[self.topdir],
|
||||
log_file=os.path.join(self.topdir, 'logs/x86_64/extraiso-my.iso.x86_64.log'),
|
||||
with_jigdo=False)]
|
||||
with_jigdo=True)]
|
||||
|
||||
)
|
||||
self.assertEqual(
|
||||
@ -223,7 +266,7 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
['bash', os.path.join(self.topdir, 'work/src/tmp-Server/extraiso-my.iso.sh')],
|
||||
[self.topdir],
|
||||
log_file=os.path.join(self.topdir, 'logs/src/extraiso-my.iso.src.log'),
|
||||
with_jigdo=False)]
|
||||
with_jigdo=True)]
|
||||
|
||||
)
|
||||
self.assertEqual(
|
||||
|
Loading…
Reference in New Issue
Block a user