CI: check empty deviceinfo variables (MR 2534)

This commit is contained in:
bo41 2021-09-18 19:00:44 +02:00 committed by BO41
parent 2c1ee5ac8f
commit 346c8d2e89
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -34,7 +34,16 @@ def test_deviceinfo(args):
for folder in glob.glob(args.aports + "/device/*/device-*"):
device = folder[len(args.aports):].split("-", 1)[1]
f = open(folder[len(args.aports):][1:] + "/deviceinfo")
lines = f.read().split("\n")
f.close()
try:
# variable can not be empty
for line in lines:
if '=""' in line:
raise RuntimeError("Please remove the empty variable: " + line)
# Successful deviceinfo parsing / obsolete options
info = pmb.parse.deviceinfo(args, device)
deviceinfo_obsolete(info)