From ed45c44931c8016e6537ac193a90ec4a58bc574b Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Thu, 7 Sep 2023 12:57:15 -0500 Subject: [PATCH] Fix the test output regex on Go 1.20 1.20 changes the output format of coverage checks slightly to include a package name on each line, followed by `coverage:`, but the current regex assumes that the line *starts* with `coverage:`. Signed-off-by: Ryan Gonzalez --- system/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/lib.py b/system/lib.py index 54a525f4..c651ea63 100644 --- a/system/lib.py +++ b/system/lib.py @@ -296,7 +296,7 @@ class BaseTest(object): if is_aptly_command: # remove the last two rows as go tests always print PASS/FAIL and coverage in those # two lines. This would otherwise fail the tests as they would not match gold - match = re.search(r"EXIT: (\d)\n.*\ncoverage: .*", raw_output.decode("utf-8")) + match = re.search(r"EXIT: (\d)\n.*\n.*coverage: .*", raw_output.decode("utf-8")) if match is None: raise Exception("no matches found in output '%s'" % raw_output.decode("utf-8"))