bin/check-missing-unittests.py | 53 ++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 14 deletions(-)
New commits: commit b7175495249958c430e16c0bad358eee0032b65a Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jan 28 12:16:49 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jan 28 20:56:21 2021 +0100 check-missing-unittests: improve script * Use findall since there might be more than 1 bugId in the summary * put everything from 'source/core/' in others Change-Id: I7d8d6e28f06a97415378c3d235b617ebc7441fbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110072 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/bin/check-missing-unittests.py b/bin/check-missing-unittests.py index 154d01d5aa25..3ce385f82f0d 100755 --- a/bin/check-missing-unittests.py +++ b/bin/check-missing-unittests.py @@ -22,12 +22,19 @@ def main(ignoredBugs): 'xhtml': {}, 'html': {}, }, - 'undo': { - 'writer': {} + 'writer': { + 'undo': {}, + 'autoformat': {}, + 'autocorrect': {}, + 'others': {}, }, - 'import': { - 'calc': {}, - 'drawingml': {} + 'calc': { + 'import': {}, + 'others': {}, + }, + 'impress': { + 'drawingml': {}, + 'others': {}, }, } @@ -51,10 +58,13 @@ def main(ignoredBugs): summary = commitInfo[0].strip('"').lower() - #Check summary has a bug id - reBugId = re.search(r'(?<=tdf#|fdo#)\d{5,6}\b', summary) - if reBugId: - bugId = reBugId.group() + # Check for bugIds in the summary. Ignore those with a '-' after the digits. + # Those are used for file names ( e.g. tdf129410-1.ods ) + bugIds = re.findall("\\b(?:bug|fdo|tdf|lo)[#:]?(\\d+)(?!-)\\b", summary) + if bugIds is None or len(bugIds) == 0: + continue + + for bugId in bugIds: isIgnored = False for i in ignoredBugs: @@ -95,15 +105,30 @@ def main(ignoredBugs): results['export']['html'][bugId] = infoList elif 'sw/source/core/undo/' in changedFiles: - results['undo']['writer'][bugId] = infoList + results['writer']['undo'][bugId] = infoList - elif 'sc/source/core/tool/interpr' in changedFiles: - results['import']['calc'][bugId] = infoList + elif 'sw/source/core/edit/autofmt' in changedFiles: + results['writer']['autoformat'][bugId] = infoList + + elif 'sw/source/core/edit/acorrect' in changedFiles: + results['writer']['autocorrect'][bugId] = infoList elif 'drawingml' in changedFiles: - results['import']['drawingml'][bugId] = infoList + results['impress']['drawingml'][bugId] = infoList + + elif 'sc/source/core/tool/interpr' in changedFiles: + results['calc']['import'][bugId] = infoList + + # Keep the following if statements at the end + + elif 'sc/source/core/data/' in changedFiles: + results['calc']['others'][bugId] = infoList + + elif 'sw/source/core/' in changedFiles: + results['writer']['others'][bugId] = infoList - # Add others here + elif 'sd/source/core/' in changedFiles: + results['impress']['others'][bugId] = infoList print() print('{{TopMenu}}') _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits