ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
a67221
From e3486e1494ab4bc23df39cae8b4bda6182265408 Mon Sep 17 00:00:00 2001
a67221
From: Daan De Meyer <daan.j.demeyer@gmail.com>
a67221
Date: Wed, 28 Aug 2024 14:08:30 +0200
a67221
Subject: [PATCH] ukify: Skip test on architectures without UEFI
a67221
a67221
---
a67221
 src/ukify/test/test_ukify.py | 7 +++++++
a67221
 1 file changed, 7 insertions(+)
a67221
a67221
diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py
a67221
index bbd26c0d42343..a08996cb55cf6 100755
a67221
--- a/src/ukify/test/test_ukify.py
a67221
+++ b/src/ukify/test/test_ukify.py
a67221
@@ -45,6 +45,13 @@
a67221
 sys.path.append(os.path.dirname(__file__) + '/..')
a67221
 import ukify
a67221
 
a67221
+# Skip if we're running on an architecture that does not use UEFI.
a67221
+try:
a67221
+    ukify.guess_efi_arch()
a67221
+except ValueError as e:
a67221
+    print(str(e), file=sys.stderr)
a67221
+    sys.exit(77)
a67221
+
a67221
 build_root = os.getenv('PROJECT_BUILD_ROOT')
a67221
 try:
a67221
     slow_tests = bool(int(os.getenv('SYSTEMD_SLOW_TESTS', '1')))