aboutsummaryrefslogtreecommitdiff
blob: 29372e0c8198c9f36d3ffbeb6449f1214ddeac01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

import re

# https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L12
def stripQuotesAndMore(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)
    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('/'):
        word = word.split('/')[-1]
    word = re.sub(":\d+:\d+:", "", word)
    return word