Merge #189 [buildinstall] Use -dvd- in volume ids instead of -boot-
This commit is contained in:
commit
8670452b6b
@ -131,19 +131,19 @@ class BuildinstallPhase(PhaseBase):
|
|||||||
|
|
||||||
repo_baseurl = self.compose.paths.work.arch_repo(arch)
|
repo_baseurl = self.compose.paths.work.arch_repo(arch)
|
||||||
output_dir = self.compose.paths.work.buildinstall_dir(arch)
|
output_dir = self.compose.paths.work.buildinstall_dir(arch)
|
||||||
volid = get_volid(self.compose, arch, disc_type="boot")
|
|
||||||
buildarch = get_valid_arches(arch)[0]
|
buildarch = get_valid_arches(arch)[0]
|
||||||
|
|
||||||
if buildinstall_method == "lorax":
|
if buildinstall_method == "lorax":
|
||||||
for variant in self.compose.get_variants(arch=arch, types=['variant']):
|
for variant in self.compose.get_variants(arch=arch, types=['variant']):
|
||||||
if variant.is_empty:
|
if variant.is_empty:
|
||||||
continue
|
continue
|
||||||
volid = get_volid(self.compose, arch, variant=variant, disc_type="boot")
|
volid = get_volid(self.compose, arch, variant=variant, disc_type="dvd")
|
||||||
commands.append(
|
commands.append(
|
||||||
(variant,
|
(variant,
|
||||||
self._get_lorax_cmd(repo_baseurl, output_dir, variant, arch, buildarch, volid))
|
self._get_lorax_cmd(repo_baseurl, output_dir, variant, arch, buildarch, volid))
|
||||||
)
|
)
|
||||||
elif buildinstall_method == "buildinstall":
|
elif buildinstall_method == "buildinstall":
|
||||||
|
volid = get_volid(self.compose, arch, disc_type="dvd")
|
||||||
commands.append(
|
commands.append(
|
||||||
(None,
|
(None,
|
||||||
lorax.get_buildinstall_cmd(product,
|
lorax.get_buildinstall_cmd(product,
|
||||||
@ -187,7 +187,7 @@ class BuildinstallPhase(PhaseBase):
|
|||||||
os_tree = self.compose.paths.compose.os_tree(arch, variant)
|
os_tree = self.compose.paths.compose.os_tree(arch, variant)
|
||||||
# TODO: label is not used
|
# TODO: label is not used
|
||||||
label = ""
|
label = ""
|
||||||
volid = get_volid(self.compose, arch, variant, escape_spaces=False, disc_type="boot")
|
volid = get_volid(self.compose, arch, variant, escape_spaces=False, disc_type="dvd")
|
||||||
tweak_buildinstall(buildinstall_dir, os_tree, arch, variant.uid, label, volid, kickstart_file)
|
tweak_buildinstall(buildinstall_dir, os_tree, arch, variant.uid, label, volid, kickstart_file)
|
||||||
symlink_boot_iso(self.compose, arch, variant)
|
symlink_boot_iso(self.compose, arch, variant)
|
||||||
|
|
||||||
|
@ -89,6 +89,11 @@ class TestBuildinstallPhase(PungiTestCase):
|
|||||||
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=True,
|
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=True,
|
||||||
volid='vol_id', variant='Client', buildinstallpackages=[],
|
volid='vol_id', variant='Client', buildinstallpackages=[],
|
||||||
bugurl=None)])
|
bugurl=None)])
|
||||||
|
self.assertItemsEqual(
|
||||||
|
get_volid.mock_calls,
|
||||||
|
[mock.call(compose, 'x86_64', variant=compose.variants['Server'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Client'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Server'], disc_type='dvd')])
|
||||||
|
|
||||||
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
||||||
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
||||||
@ -122,6 +127,9 @@ class TestBuildinstallPhase(PungiTestCase):
|
|||||||
volid='vol_id', variant='Client', buildinstallpackages=[],
|
volid='vol_id', variant='Client', buildinstallpackages=[],
|
||||||
bugurl=None)],
|
bugurl=None)],
|
||||||
any_order=True)
|
any_order=True)
|
||||||
|
self.assertItemsEqual(
|
||||||
|
get_volid.mock_calls,
|
||||||
|
[mock.call(compose, 'amd64', variant=compose.variants['Client'], disc_type='dvd')])
|
||||||
|
|
||||||
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
||||||
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
||||||
@ -155,6 +163,10 @@ class TestBuildinstallPhase(PungiTestCase):
|
|||||||
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
|
mock.call('Test', '1', '1', self.topdir + '/work/amd64/repo',
|
||||||
self.topdir + '/work/amd64/buildinstall',
|
self.topdir + '/work/amd64/buildinstall',
|
||||||
buildarch='amd64', is_final=True, volid='vol_id')])
|
buildarch='amd64', is_final=True, volid='vol_id')])
|
||||||
|
self.assertItemsEqual(
|
||||||
|
get_volid.mock_calls,
|
||||||
|
[mock.call(compose, 'x86_64', disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', disc_type='dvd')])
|
||||||
|
|
||||||
def test_global_upgrade_with_lorax(self):
|
def test_global_upgrade_with_lorax(self):
|
||||||
compose = BuildInstallCompose(self.topdir, {
|
compose = BuildInstallCompose(self.topdir, {
|
||||||
@ -237,6 +249,11 @@ class TestBuildinstallPhase(PungiTestCase):
|
|||||||
buildarch='amd64', is_final=True, nomacboot=False, noupgrade=True,
|
buildarch='amd64', is_final=True, nomacboot=False, noupgrade=True,
|
||||||
volid='vol_id', variant='Client', buildinstallpackages=[],
|
volid='vol_id', variant='Client', buildinstallpackages=[],
|
||||||
bugurl=None)])
|
bugurl=None)])
|
||||||
|
self.assertItemsEqual(
|
||||||
|
get_volid.mock_calls,
|
||||||
|
[mock.call(compose, 'x86_64', variant=compose.variants['Server'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Client'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Server'], disc_type='dvd')])
|
||||||
|
|
||||||
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
@mock.patch('pungi.phases.buildinstall.ThreadPool')
|
||||||
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
@mock.patch('pungi.phases.buildinstall.LoraxWrapper')
|
||||||
@ -286,6 +303,11 @@ class TestBuildinstallPhase(PungiTestCase):
|
|||||||
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=False,
|
buildarch='amd64', is_final=True, nomacboot=True, noupgrade=False,
|
||||||
volid='vol_id', variant='Client', buildinstallpackages=[],
|
volid='vol_id', variant='Client', buildinstallpackages=[],
|
||||||
bugurl=None)])
|
bugurl=None)])
|
||||||
|
self.assertItemsEqual(
|
||||||
|
get_volid.mock_calls,
|
||||||
|
[mock.call(compose, 'x86_64', variant=compose.variants['Server'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Client'], disc_type='dvd'),
|
||||||
|
mock.call(compose, 'amd64', variant=compose.variants['Server'], disc_type='dvd')])
|
||||||
|
|
||||||
|
|
||||||
class TestCopyFiles(PungiTestCase):
|
class TestCopyFiles(PungiTestCase):
|
||||||
@ -312,9 +334,9 @@ class TestCopyFiles(PungiTestCase):
|
|||||||
|
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
get_volid.mock_calls,
|
get_volid.mock_calls,
|
||||||
[mock.call(compose, 'x86_64', compose.variants['Server'], escape_spaces=False, disc_type='boot'),
|
[mock.call(compose, 'x86_64', compose.variants['Server'], escape_spaces=False, disc_type='dvd'),
|
||||||
mock.call(compose, 'amd64', compose.variants['Client'], escape_spaces=False, disc_type='boot'),
|
mock.call(compose, 'amd64', compose.variants['Client'], escape_spaces=False, disc_type='dvd'),
|
||||||
mock.call(compose, 'amd64', compose.variants['Server'], escape_spaces=False, disc_type='boot')])
|
mock.call(compose, 'amd64', compose.variants['Server'], escape_spaces=False, disc_type='dvd')])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
tweak_buildinstall.mock_calls,
|
tweak_buildinstall.mock_calls,
|
||||||
[mock.call(self.topdir + '/work/x86_64/buildinstall',
|
[mock.call(self.topdir + '/work/x86_64/buildinstall',
|
||||||
@ -354,9 +376,9 @@ class TestCopyFiles(PungiTestCase):
|
|||||||
|
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
get_volid.mock_calls,
|
get_volid.mock_calls,
|
||||||
[mock.call(compose, 'x86_64', compose.variants['Server'], escape_spaces=False, disc_type='boot'),
|
[mock.call(compose, 'x86_64', compose.variants['Server'], escape_spaces=False, disc_type='dvd'),
|
||||||
mock.call(compose, 'amd64', compose.variants['Client'], escape_spaces=False, disc_type='boot'),
|
mock.call(compose, 'amd64', compose.variants['Client'], escape_spaces=False, disc_type='dvd'),
|
||||||
mock.call(compose, 'amd64', compose.variants['Server'], escape_spaces=False, disc_type='boot')])
|
mock.call(compose, 'amd64', compose.variants['Server'], escape_spaces=False, disc_type='dvd')])
|
||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
tweak_buildinstall.mock_calls,
|
tweak_buildinstall.mock_calls,
|
||||||
[mock.call(self.topdir + '/work/x86_64/buildinstall/Server',
|
[mock.call(self.topdir + '/work/x86_64/buildinstall/Server',
|
||||||
|
Loading…
Reference in New Issue
Block a user