summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>2024-03-26 16:08:57 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-03-26 18:32:42 +0100
commitf0896ca55781c842996b018b35ba63917d8af444 (patch)
tree2e2b6270efaabc3591e543623db25f385cec1226 /tools
parenthwdb: fix Asus T300FA rotation matrix (#31973) (diff)
downloadsystemd-f0896ca55781c842996b018b35ba63917d8af444.tar.xz
systemd-f0896ca55781c842996b018b35ba63917d8af444.zip
efi: skip check-alignment-* tests if pefile is not installed
Otherwise, when building with ukify disabled, no one else requires pefile, and if it is not installed, those tests fail: ``` ================================== 12/1212 =================================== test: systemd:efi / check-alignment-systemd-bootx64.efi start time: 14:21:54 duration: 0.08s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/systemd-bootx64.efi ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ================================== 13/1212 =================================== test: systemd:efi / check-alignment-linuxx64.efi.stub start time: 14:21:54 duration: 0.08s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/linuxx64.efi.stub ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ================================== 14/1212 =================================== test: systemd:efi / check-alignment-addonx64.efi.stub start time: 14:21:54 duration: 0.07s result: exit status 1 command: /mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py /mnt/work/systemd/upstream-fork/main/build/src/boot/efi/addonx64.efi.stub ----------------------------------- stderr ----------------------------------- Traceback (most recent call last): File "/mnt/work/systemd/upstream-fork/main/tools/check-efi-alignment.py", line 7, in <module> import pefile ModuleNotFoundError: No module named 'pefile' ============================================================================== ``` Follow-up for 7ff3b88396f440bff60328b4bff7627a34d45e4a
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-efi-alignment.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/check-efi-alignment.py b/tools/check-efi-alignment.py
index bb33ac0809..26d5f5e40d 100755
--- a/tools/check-efi-alignment.py
+++ b/tools/check-efi-alignment.py
@@ -4,7 +4,11 @@
import sys
-import pefile
+try:
+ import pefile
+except ImportError as e:
+ print(str(e), file=sys.stderr)
+ sys.exit(77)
def main():