aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2024-03-12 21:39:02 +0100
committerMagnus Granberg <zorry@gentoo.org>2024-03-12 21:39:02 +0100
commit955e80294c70d1a47ab39b656e9d9357cf3f5f8d (patch)
treed5c46d3f2be7414c39339d7d50ca4b5147d254e6 /buildbot_gentoo_ci
parentAdd bugsettings to project (diff)
downloadtinderbox-cluster-955e80294c70d1a47ab39b656e9d9357cf3f5f8d.tar.gz
tinderbox-cluster-955e80294c70d1a47ab39b656e9d9357cf3f5f8d.tar.bz2
tinderbox-cluster-955e80294c70d1a47ab39b656e9d9357cf3f5f8d.zip
Fix finishTitle for path regex
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
Diffstat (limited to 'buildbot_gentoo_ci')
-rw-r--r--buildbot_gentoo_ci/utils/regex.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/buildbot_gentoo_ci/utils/regex.py b/buildbot_gentoo_ci/utils/regex.py
index 29372e0..c8d19d0 100644
--- a/buildbot_gentoo_ci/utils/regex.py
+++ b/buildbot_gentoo_ci/utils/regex.py
@@ -5,18 +5,25 @@ import re
# https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L12
def stripQuotesAndMore(word):
+ word2 = word
word = re.sub(r"b'", "", word)
word = re.sub(r"'", "", word)
word = re.sub(r'`', '', word)
word = re.sub(r'"', '', word)
word = re.sub(r'\\', '', word)
+ print(f"Word: {word2} Finish Word: {word}")
return word
# strip away hex addresses, loong path names, line and time numbers and other stuff
# https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L469
# FIXME: Add the needed line when needed
def finishTitle(word):
- if word.startswith('/'):
+ word2 = word
+ # /usr/foo/baa/ghyk.c:67:69: -> ghyk.c:567:76:
+ if '/' in word and word.endswith(':'):
word = word.split('/')[-1]
- word = re.sub(":\d+:\d+:", "", word)
+ # ghyfv.v:78:9876: -> ghyfv.v
+ if word.endswith(':') and any(i.isdigit() for i in word):
+ word = word.split(':')[0]
+ print(f"Word: {word2} Finish Word: {word}")
return word