
From: Simon Glass <sjg@chromium.org> If there is a failure before any test manages to run, the timing summary will not be present. Handle this case to avoid a strange exception. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/py/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index 5074444731c..4460e5a3af2 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -31,6 +31,7 @@ import time # Globals: The HTML log file, and the top-level fixture log = None ubman_fix = None +ubconfig = None TEST_PY_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -613,7 +614,7 @@ def show_timings(): if too_long: show_bar(f'>{get_time_delta(max_dur)}', too_long_msecs, too_long) log.info(buf.getvalue()) - if ubconfig.timing: + if ubconfig and hasattr(ubconfig, 'timing'): print(buf.getvalue(), end='') -- 2.43.0