Skip to content

Commit b9898ad

Browse files
committed
e2e: use regex to extract SecureBoot byte (pexpect output contains OSC escape sequences)
1 parent 27232bf commit b9898ad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/e2e.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def test_secure_boot_enabled(child):
112112
"2>/dev/null | tr -s ' ' '\\n' | tail -1"
113113
)
114114
assert rc == 0, "SecureBoot EFI variable not readable"
115-
assert out.strip() == "1", f"Secure Boot not active (last byte = {out.strip()!r})"
115+
m = re.search(r"(\d+)\s*$", out)
116+
assert m and m.group(1) == "1", f"Secure Boot not active: {out.strip()!r}"
116117

117118

118119
def test_status(child):

0 commit comments

Comments
 (0)