From be2cf8f985730c7857e26682da042caac2110113 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 20 Dec 2024 21:03:22 +0000 Subject: [PATCH] Backport test suite workaround for boom-boot #59 Resolves: RHEL-59005 --- ...y-exclude-CentOS-from-test_boot.is_r.patch | 38 +++++++++++++++++++ snapm.spec | 1 + 2 files changed, 39 insertions(+) create mode 100644 0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch diff --git a/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch b/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch new file mode 100644 index 0000000..0e5264a --- /dev/null +++ b/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch @@ -0,0 +1,38 @@ +From 5b96245740eb8ee94ff744edb9cacd1d161ddec0 Mon Sep 17 00:00:00 2001 +From: "Bryn M. Reeves" +Date: Fri, 20 Dec 2024 20:32:14 +0000 +Subject: [PATCH] tests: temporarily exclude CentOS from test_boot.is_redhat() + check + +The current version of boom-boot in CentOS Stream does not support +automatic --uname-pattern for CentOS installations: + + # boom profile create --from-host + Could not determine uname pattern for 'CentOS Stream' + +Exclude CentOS temporarily from the profile auto-creation test until +https://github.com/snapshotmanager/boom-boot/issues/59 is fixed and +available in the CentOS repos. +--- + tests/test_boot.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/test_boot.py b/tests/test_boot.py +index a15ce5f..e8d76ee 100644 +--- a/tests/test_boot.py ++++ b/tests/test_boot.py +@@ -39,7 +39,10 @@ _VAR_TMP = "/var/tmp" + + + def is_redhat(): +- return os.path.exists("/etc/redhat-release") ++ # Exclude CentOS for now until the fix for boom-boot #59 is available ++ # in the CentOS repositories. ++ return (os.path.exists("/etc/redhat-release") ++ and not os.path.exists("/etc/centos-release")) + + + class BootTestsSimple(unittest.TestCase): +-- +2.47.1 + diff --git a/snapm.spec b/snapm.spec index d089176..da2461d 100644 --- a/snapm.spec +++ b/snapm.spec @@ -9,6 +9,7 @@ Summary: %{summary} License: GPL-2.0-only AND Apache-2.0 URL: https://github.com/snapshotmanager/snapm Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch BuildArch: noarch