Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ List of contributors, in chronological order:
* Mauro Regli (https://github.com/reglim)
* Alexander Zubarev (https://github.com/strike)
* Nicolas Dostert (https://github.com/acdn-ndostert)
* Ryan Gonzalez (https://github.com/refi64)
11 changes: 4 additions & 7 deletions system/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,12 @@ def run_cmd(self, command, expected_code=0):
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
matches = re.findall(r"((.|\n)*)EXIT: (\d)\n.*\ncoverage: .*", raw_output.decode("utf-8"))
if not matches:
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"))

output, _, returncode = matches[0]

output = output.encode()
returncodes.append(int(returncode))

output = match.string[:match.start()].encode()
returncodes.append(int(match.group(1)))
else:
output = raw_output

Expand Down