Hashar has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332890 )
Change subject: test: mw ext/skins have test templates in Zuul ...................................................................... test: mw ext/skins have test templates in Zuul Add a test that crawl the Zuul layout.yaml files for MediaWiki extensions and skins. Make sure each have a Zuul template that contains PHPUnit jobs (extension-unittests-*, skin-tests*, extension-gate). Skip archived repos and sub repositories of extensions. Change-Id: Iaecaaa3457af4426d130ff25f6bc1100b312f7ef --- M tests/test_zuul_layout.py 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/90/332890/1 diff --git a/tests/test_zuul_layout.py b/tests/test_zuul_layout.py index 3d2d55d..08c77bb 100644 --- a/tests/test_zuul_layout.py +++ b/tests/test_zuul_layout.py @@ -10,6 +10,12 @@ class TestZuulLayout(unittest.TestCase): + """ + Tests solely asserting on the Zuul YAML configuration. + + Notably expansion of templates are not available which is provied by the + scheduler and tested via test_zuul_scheduler.py + """ layout = None @@ -20,3 +26,35 @@ '../zuul/layout.yaml') with open(wmf_zuul_layout, 'r') as f: cls.layout = yaml.load(f) + + def test_mediawiki_ext_skins_have_test_templates(self): + one_of_templates = ( + 'archived', + 'extension-unittests', + 'skin-tests', + 'extension-gate', + ) + errors = [] + for project in self.layout['projects']: + try: + if not project['name'].startswith(( + 'mediawiki/skins', 'mediawiki/extensions')): + continue + + if len(project['name'].split('/')) != 3: + # Skip sub repositories + continue + + has_extension_unittests = any([ + template['name'].startswith(one_of_templates) + for template in project.get('template', {}) + ]) + self.assertTrue( + has_extension_unittests, + 'Project %s in Zuul lacks an extension-unittests* ' + 'template' % project['name']) + except AssertionError, e: + errors.append(str(e)) + + self.maxDiff = None + self.assertListEqual([], errors) -- To view, visit https://gerrit.wikimedia.org/r/332890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaecaaa3457af4426d130ff25f6bc1100b312f7ef Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits