openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #32461
[Merge] lp:~raoul-snyman/openlp/dont-test-uno-on-macos into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/dont-test-uno-on-macos into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/dont-test-uno-on-macos/+merge/334625
Fix up and skip some of the tests that don't run on macOS, and add a new parameter to the Jenkins script to continue despite failure.
Add this to your merge proposal:
--------------------------------------------------------------------------------
lp:~raoul-snyman/openlp/dont-test-uno-on-macos (revision 2797)
https://ci.openlp.io/job/Branch-01-Pull/2325/ [SUCCESS]
https://ci.openlp.io/job/Branch-02-Functional-Tests/2226/ [SUCCESS]
https://ci.openlp.io/job/Branch-03-Interface-Tests/2102/ [SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code_Analysis/1428/ [SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test_Coverage/1250/ [SUCCESS]
https://ci.openlp.io/job/Branch-04c-Code_Analysis2/380/ [SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/209/ [FAILURE]
https://ci.openlp.io/job/Branch-07-macOS-Tests/21/ [SUCCESS]
Failed builds:
- Branch-05-AppVeyor-Tests #209: https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/209/console
--
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/dont-test-uno-on-macos into lp:openlp.
=== modified file 'scripts/jenkins_script.py'
--- scripts/jenkins_script.py 2017-11-10 17:51:42 +0000
+++ scripts/jenkins_script.py 2017-12-02 00:53:41 +0000
@@ -63,9 +63,10 @@
Branch_Coverage = 'Branch-04b-Test_Coverage'
Branch_Pylint = 'Branch-04c-Code_Analysis2'
Branch_AppVeyor = 'Branch-05-AppVeyor-Tests'
+ Branch_macOS = 'Branch-07-macOS-Tests'
Jobs = [Branch_Pull, Branch_Functional, Branch_Interface, Branch_PEP, Branch_Coverage, Branch_Pylint,
- Branch_AppVeyor]
+ Branch_AppVeyor, Branch_macOS]
class Colour(object):
@@ -115,7 +116,7 @@
self.fetch_jobs()
self.server.build_job(OpenLPJobs.Branch_Pull, {'BRANCH_NAME': self.repo_name, 'cause': cause})
- def print_output(self):
+ def print_output(self, can_continue=False):
"""
Print the status information of the build triggered.
"""
@@ -126,13 +127,21 @@
revno = raw_output.decode().strip()
print('%s (revision %s)' % (get_repo_name(), revno))
+ failed_builds = []
for job in OpenLPJobs.Jobs:
if not self.__print_build_info(job):
if self.current_build:
- print('Stopping after failure, see {}console for more details'.format(self.current_build['url']))
- else:
+ failed_builds.append((self.current_build['fullDisplayName'], self.current_build['url']))
+ if not can_continue:
print('Stopping after failure')
- break
+ break
+ print('')
+ if failed_builds:
+ print('Failed builds:')
+ for build_name, url in failed_builds:
+ print(' - {}: {}console'.format(build_name, url))
+ else:
+ print('All builds passed')
def open_browser(self):
"""
@@ -227,6 +236,7 @@
help='Disable coloured output (always disabled on Windows)')
parser.add_argument('-u', '--username', required=True, help='Your Jenkins username')
parser.add_argument('-p', '--password', required=True, help='Your Jenkins password or personal token')
+ parser.add_argument('-c', '--always-continue', action='store_true', default=False, help='Continue despite failure')
args = parser.parse_args()
if not get_repo_name():
@@ -238,7 +248,7 @@
if args.open_browser:
jenkins_trigger.open_browser()
if not args.disable_output:
- jenkins_trigger.print_output()
+ jenkins_trigger.print_output(can_continue=args.always_continue)
if __name__ == '__main__':
=== modified file 'tests/functional/openlp_core/common/test_i18n.py'
--- tests/functional/openlp_core/common/test_i18n.py 2017-11-03 22:52:24 +0000
+++ tests/functional/openlp_core/common/test_i18n.py 2017-12-02 00:53:41 +0000
@@ -22,8 +22,10 @@
"""
Package to test the openlp.core.lib.languages package.
"""
+from unittest import skipIf
from unittest.mock import MagicMock, patch
+from openlp.core.common import is_macosx
from openlp.core.common.i18n import LANGUAGES, Language, UiStrings, get_language, get_locale_key, get_natural_key, \
translate
@@ -110,6 +112,7 @@
assert language is None
+@skipIf(is_macosx(), 'This test doesn\'t work on macOS currently')
def test_get_locale_key():
"""
Test the get_locale_key(string) function
=== modified file 'tests/functional/openlp_plugins/songs/test_openoffice.py'
--- tests/functional/openlp_plugins/songs/test_openoffice.py 2017-10-10 02:29:56 +0000
+++ tests/functional/openlp_plugins/songs/test_openoffice.py 2017-12-02 00:53:41 +0000
@@ -22,18 +22,20 @@
"""
This module contains tests for the OpenOffice/LibreOffice importer.
"""
-from unittest import TestCase, SkipTest
+from unittest import TestCase, skipIf
from unittest.mock import MagicMock, patch
from openlp.core.common.registry import Registry
+
+from tests.helpers.testmixin import TestMixin
+
try:
from openlp.plugins.songs.lib.importers.openoffice import OpenOfficeImport
except ImportError:
- raise SkipTest('Could not import OpenOfficeImport probably due to unavailability of uno')
-
-from tests.helpers.testmixin import TestMixin
-
-
+ OpenOfficeImport = None
+
+
+@skipIf(OpenOfficeImport is None, 'Could not import OpenOfficeImport probably due to unavailability of uno')
class TestOpenOfficeImport(TestCase, TestMixin):
"""
Test the :class:`~openlp.plugins.songs.lib.importer.openoffice.OpenOfficeImport` class
Follow ups