Bug 1626001 - Strip some text from test_names for Push Health (#6208)

This commit is contained in:
Cameron Dawson 2020-03-31 16:11:44 -07:00 коммит произвёл GitHub
Родитель 8112fcc530
Коммит 6883ca307d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,13 @@
# These strings will be omitted from test paths to more easily correllate
# them to other test paths.
trim_parts = [
'TEST-UNEXPECTED-FAIL',
'REFTEST TEST-UNEXPECTED-FAIL',
'TEST-UNEXPECTED-PASS',
'REFTEST TEST-UNEXPECTED-PASS',
]
def clean_test(action, test, signature, message):
try:
clean_name = 'Non-Test Error'
@ -56,6 +66,12 @@ def clean_test(action, test, signature, message):
clean_name = clean_name.strip()
clean_name = clean_name.replace('\\', '/')
clean_name = clean_name.lstrip('/')
if '|' in clean_name:
parts = clean_name.split('|')
clean_parts = filter(lambda x: not x.strip() in trim_parts, parts)
clean_name = '|'.join(clean_parts)
return clean_name