Bugzilla – Attachment 160309 Details for
Bug 132615
[META] unittests with different pages at import and export time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
script to list the failures
checkImportExportPages.py (text/x-python), 2.46 KB, created by
Xisco FaulĂ
on 2020-05-04 07:42:56 UTC
(
hide
)
Description:
script to list the failures
Filename:
MIME Type:
Creator:
Xisco FaulĂ
Created:
2020-05-04 07:42:56 UTC
Size:
2.46 KB
patch
obsolete
>#!/usr/bin/env python3 > ># This file is part of the LibreOffice project. ># ># This Source Code Form is subject to the terms of the Mozilla Public ># License, v. 2.0. If a copy of the MPL was not distributed with this ># file, You can obtain one at http://mozilla.org/MPL/2.0/. > >from bs4 import BeautifulSoup, SoupStrainer >import os >import sys >from urllib.request import urlopen > >def usage(): > message = """usage: ./{program} jenkins_build_url > >Sample: ./{program} https://ci.libreoffice.org/job/gerrit_master/55078/""" > print(message.format(program = os.path.basename(sys.argv[0]))) > >if __name__ == '__main__': > > if len(sys.argv) > 1: > arg1 = sys.argv[1] > if arg1 == '-h' or arg1 == "--help": > usage() > sys.exit(1) > else: > usage() > sys.exit(1) > > page = urlopen(arg1) > soup = BeautifulSoup(page, features="lxml") > > buildLinks = {} > for link in soup.find_all('a'): > if 'gerrit_mac' in link: > buildLinks['gerrit_mac'] = link.get('href').split('gerrit_mac/')[1].split('/')[0] > elif 'gerrit_linux_gcc_release' in link: > buildLinks["gerrit_linux_gcc_release"] = link.get('href').split('gerrit_linux_gcc_release/')[1].split('/')[0] > elif 'gerrit_windows' in link: > buildLinks["gerrit_windows"] = link.get('href').split('gerrit_windows/')[1].split('/')[0] > elif 'gerrit_linux_clang_dbgutil' in link: > buildLinks["gerrit_linux_clang_dbgutil"] = link.get('href').split('gerrit_linux_clang_dbgutil/')[1].split('/')[0] > > failedTest = {} > for k, v in buildLinks.items(): > url = "https://ci.libreoffice.org/job/" + k + "/" + str(v) + "/consoleFull" > > lines = urlopen(url).readlines() > for i in range(len(lines)): > if b'Number of pages at import and export time are different' in lines[i]: > line = lines[i - 4].decode('utf-8').strip() > expected = lines[i - 2].decode('utf-8').strip() > actual = lines[i - 1].decode('utf-8').strip() > if line.startswith('Test name:'): > failedTest[line.split(": ")[1]] = [expected.split(": ")[1], actual.split(": ")[1]] > > print() > print('{{TopMenu}}') > print('{{Menu}}') > print('{{Menu.Development}}') > print() > > for k, v in sorted(failedTest.items()): > print("* " + k) > print("** Expected: " + str(v[0])) > print("** Actual: " + str(v[1])) > > print() > print('[[Category:QA]][[Category:Development]]') >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 132615
: 160309