From 92bb7ff53536ce48a212b5e3d3e4c3c0407a855c Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Thu, 2 Apr 2020 16:56:54 +0200 Subject: [PATCH] Ignore absolute paths after stripping work dir After stripping the work dir there should not be any absolute path left that can be related to the repo. Thus filter them so they don't produce mapping warnings in zuul. Change-Id: Iadeac9b1faea63aa6009e2cfbc215853695abbe6 --- roles/tox/library/tox_parse_output.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/tox/library/tox_parse_output.py b/roles/tox/library/tox_parse_output.py index 14d6e3865..a74830304 100644 --- a/roles/tox/library/tox_parse_output.py +++ b/roles/tox/library/tox_parse_output.py @@ -111,6 +111,11 @@ def extract_file_comments(tox_output, tox_envlist): if file_path.startswith(cwd): file_path = file_path[len(cwd):] + # After stripping we don't allow absolute paths anymore since they + # cannot be linked to a file in the repo in zuul. + if file_path.startswith('/'): + continue + ret.setdefault(file_path, []) if tox_envlist: message = "{envlist}: {message}".format(