.ci/testcases/test_device.py: fix TypeError errors (MR 5863)

Fix TypeError when RuntimeError is thrown

Example:
FAILED testcases/test_device.py::test_aports_device -
	TypeError: can only concatenate str (not "PosixPath") to str
This commit is contained in:
Anri Dellal 2024-11-30 12:04:41 +03:00 committed by Anjandev Momi
parent 660518e165
commit b22ec1522a
No known key found for this signature in database
GPG Key ID: 74482A13A109255D

View File

@ -47,8 +47,7 @@ def test_aports_device():
if "postmarketos-base" == dependency or "postmarketos-base>" in dependency:
depend_flag = True
if not depend_flag:
raise RuntimeError("Missing 'postmarketos-base' in depends of " +
path)
raise RuntimeError(f"Missing 'postmarketos-base' in depends of {path}")
# Depends: Must not have specific packages
for depend in apkbuild["depends"]:
@ -61,7 +60,7 @@ def test_aports_device():
raise RuntimeError("wrong architecture, please change to arch=\""
f"{deviceinfo.arch}\": {path}")
if "!archcheck" not in apkbuild["options"]:
raise RuntimeError("!archcheck missing in options= line: " + path)
raise RuntimeError(f"!archcheck missing in options= line: {path}")
def test_aports_device_kernel():