CI: Remove obsolete deviceinfo validation
This functionality is now handled by dint. Signed-off-by: Stefan Hansson <newbyte@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7378>
This commit is contained in:
parent
87b6b9b9fa
commit
b47edd33af
1 changed files with 0 additions and 26 deletions
|
|
@ -13,22 +13,6 @@ import pmb.parse
|
|||
from pmb.core.pkgrepo import pkgrepo_iglob
|
||||
|
||||
|
||||
def deviceinfo_obsolete(info):
|
||||
"""
|
||||
Test for obsolete options used in the deviceinfo file. They must still be
|
||||
defined in pmbootstrap's config/__init__.py.
|
||||
"""
|
||||
obsolete_options = [
|
||||
"usb_rndis_function",
|
||||
"weston_pixman_type",
|
||||
]
|
||||
for option in obsolete_options:
|
||||
if getattr(info, option, None):
|
||||
raise RuntimeError(f"option {option} is obsolete, please rename"
|
||||
" or remove it (see reasons for removal of at"
|
||||
" https://postmarketos.org/deviceinfo)")
|
||||
|
||||
|
||||
def test_deviceinfo():
|
||||
"""
|
||||
Parse all deviceinfo files successfully and run checks on the parsed data.
|
||||
|
|
@ -47,19 +31,10 @@ def test_deviceinfo():
|
|||
|
||||
try:
|
||||
for line in lines:
|
||||
# Require space after # for comments
|
||||
if line.startswith("#") and not line.startswith("# "):
|
||||
raise RuntimeError("Comment style: please change '#' to"
|
||||
f" '# ': {line}")
|
||||
|
||||
# Skip empty lines and comments
|
||||
if not line or line.startswith("# "):
|
||||
continue
|
||||
|
||||
# Variable can not be empty
|
||||
if '=""' in line:
|
||||
raise RuntimeError("Please remove the empty variable: " + line)
|
||||
|
||||
# Check line against regex (can't use multiple lines etc.)
|
||||
if not pattern.match(line) or line.endswith("\\\""):
|
||||
raise RuntimeError("Line looks invalid, maybe missing"
|
||||
|
|
@ -68,7 +43,6 @@ def test_deviceinfo():
|
|||
|
||||
# Successful deviceinfo parsing / obsolete options
|
||||
info = pmb.parse.deviceinfo(device)
|
||||
deviceinfo_obsolete(info)
|
||||
|
||||
# deviceinfo_name must start with manufacturer
|
||||
name = info.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue