systemd/0090-ukify-Skip-test-on-architectures-without-UEFI.patch
Jan Macku 4453528ae0 systemd-256-14
Resolves: RHEL-52634
2024-09-02 06:38:12 +00:00

31 lines
983 B
Diff

From 65dbacdb67ae94f7481a413dfea651b2d8a74d13 Mon Sep 17 00:00:00 2001
From: Daan De Meyer <daan.j.demeyer@gmail.com>
Date: Wed, 28 Aug 2024 14:08:30 +0200
Subject: [PATCH] ukify: Skip test on architectures without UEFI
(cherry picked from commit 5121f7c45b37afca53c89f42123b1dd6a04fa80f)
Related: RHEL-52634
---
src/ukify/test/test_ukify.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py
index 0e3f932890..15d1578695 100755
--- a/src/ukify/test/test_ukify.py
+++ b/src/ukify/test/test_ukify.py
@@ -35,6 +35,13 @@ except ImportError as e:
sys.path.append(os.path.dirname(__file__) + '/..')
import ukify
+# Skip if we're running on an architecture that does not use UEFI.
+try:
+ ukify.guess_efi_arch()
+except ValueError as e:
+ print(str(e), file=sys.stderr)
+ sys.exit(77)
+
build_root = os.getenv('PROJECT_BUILD_ROOT')
try:
slow_tests = bool(int(os.getenv('SYSTEMD_SLOW_TESTS', '1')))