diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-28 12:16:49 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-01-28 20:56:21 +0100 |
commit | b7175495249958c430e16c0bad358eee0032b65a (patch) | |
tree | fb6c35f2fb5a184082ae7763c1477430a207d52e /bin | |
parent | 960e88835e0b2f7ff5fc57393b74017198c314e3 (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-missing-unittests.py | 53 |
1 files changed, 39 insertions, 14 deletions
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}}') |