Commit 73d2bda3 authored by Joel Goddard's avatar Joel Goddard
Browse files

tools/qa-checks: Add error trace and argument grouping

Full error traces are now printed for errors in check module files
to help locating errors.

Arguments are now formatted in groups based on the check module
they are from when printed in --help.

Issue-Id: SCM-3902
Signed-off-by: Joel Goddard's avatarJoel Goddard <>
Change-Id: I4de1b9114f20c3bb300d040ea5752598d73a7387
parent 426824d2
......@@ -39,6 +39,7 @@ import shutil
import subprocess
import sys
import tempfile
import traceback
import venv
import abstract_check
......@@ -208,12 +209,14 @@ def parse_options():
name =
list_args, args, _ = check.get_vars()
group = parser.add_argument_group(f"{name} check arguments")
for arg, msg in {**list_args, **args}.items():
prefix = ""
if arg in list_args:
prefix = "Comma-separated list: "
parser.add_argument(f"--{name}_{arg}", required=False,
group.add_argument(f"--{name}_{arg}", required=False,
default_config_file = "meta-ewaol-config/qa-checks/qa-checks_config.yml"
......@@ -615,7 +618,8 @@ def main():
except Exception as e:
logger.error(("Caught exception when executing the"
f" {} check:"))
etype=type(e), value=e, tb=e.__traceback__)))
rc = 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment