teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From e3486e1494ab4bc23df39cae8b4bda6182265408 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

---
 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 bbd26c0d42343..a08996cb55cf6 100755
--- a/src/ukify/test/test_ukify.py
+++ b/src/ukify/test/test_ukify.py
@@ -45,6 +45,13 @@
 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')))