From 32ce9e9dc41f6122af6bdefaddacbb3e2ecfff2a Mon Sep 17 00:00:00 2001 From: William Douglas Date: Fri, 4 Feb 2022 16:00:12 -0800 Subject: [PATCH] check: Add handling for empty testcount key In some packages (kubernetes) builds that skip the final round may have content in the build.log interpreted as test results. For these cases try and use the empty test count key as a signal that the previous build should be used for test results instead. In some cases this will cause packages that had no tests for an empty key to use the previous build round for reporting test results but hopefully that won't cause test reporting failures. Signed-off-by: William Douglas --- autospec/check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autospec/check.py b/autospec/check.py index c502ee5..91726ab 100644 --- a/autospec/check.py +++ b/autospec/check.py @@ -35,7 +35,7 @@ def check_regression(pkg_dir, skip_tests, test_round): log_path = os.path.join(pkg_dir, 'results', 'build.log') result = count.parse_log(log_path) - if len(result) == 0: + if len(result) == 0 or result[0:2] == ',0': log_path = os.path.join(pkg_dir, 'results', f"round{test_round}-build.log") result = count.parse_log(log_path)