From 756d3d8416ffe24cf34522d48f914598cecfd92e Mon Sep 17 00:00:00 2001 From: Mark Klein Date: Fri, 15 Jan 2021 00:23:55 +0000 Subject: This adds arm64 compatibility for RH installations The current behaviour for Redhat based installs assumes x86_64 arch for grub. This change queries the target arch and makes decisions on packages based on that. --- tests/unittests/test_curthooks.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/unittests/test_curthooks.py') diff --git a/tests/unittests/test_curthooks.py b/tests/unittests/test_curthooks.py index e5fead35..41670f71 100644 --- a/tests/unittests/test_curthooks.py +++ b/tests/unittests/test_curthooks.py @@ -504,6 +504,22 @@ class TestInstallMissingPkgs(CiTestCase): self.mock_install_packages.assert_called_with( expected_pkgs, target=target, osfamily=distro.DISTROS.redhat) + @patch.object(events, 'ReportEventStack') + def test_install_packages_on_uefi_arm64_centos(self, mock_events): + arch = 'arm64' + self.mock_arch.return_value = arch + self.mock_machine.return_value = 'arm64' + expected_pkgs = ['efibootmgr', 'grub2-efi-aa64', + 'grub2-efi-aa64-modules', 'shim-aa64'] + self.mock_uefi.return_value = True + self.mock_haspkg.return_value = True + target = "not-a-real-target" + cfg = {} + curthooks.install_missing_packages( + cfg, target=target, osfamily=distro.DISTROS.redhat) + self.mock_install_packages.assert_called_with( + expected_pkgs, target=target, osfamily=distro.DISTROS.redhat) + class TestSetupZipl(CiTestCase): -- cgit v1.2.3