From edb068bff4b8f67b3c130c63d9f51b88b3761aec Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 2 Aug 2022 17:11:38 +0200 Subject: [PATCH] Fix print_junit_results failure during some error conditions There is a small window between setting self.precise_prop_status and initializing self.design. I've only managed to produce an error within that windows during development, but getting unrelated stacktraces from print_junit_result failing distracts from debugging the issue at hand. --- sbysrc/sby_core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 790d64d..ce69f9d 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -906,6 +906,8 @@ class SbyTask(SbyConfig): def print_junit_result(self, f, junit_ts_name, junit_tc_name, junit_format_strict=False): junit_time = strftime('%Y-%m-%dT%H:%M:%S') + if not self.design: + self.precise_prop_status = False if self.precise_prop_status: checks = self.design.hierarchy.get_property_list() junit_tests = len(checks)