Bug 1403222 - Add test suite families to SCHEDULES.exclusive
MozReview-Commit-ID: JWKB7eOgfWc
--- a/layout/tools/reftest/moz.build
+++ b/layout/tools/reftest/moz.build
@@ -1,16 +1,17 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
with Files('**'):
BUG_COMPONENT = ('Testing', 'Reftest')
+ SCHEDULES.exclusive = ['reftest']
XPI_NAME = 'reftest'
USE_EXTENSION_MANIFEST = True
JAR_MANIFESTS += ['jar.mn']
FINAL_TARGET_PP_FILES += ['install.rdf']
FINAL_TARGET_FILES += ['bootstrap.js']
GENERATED_FILES += ['automation.py']
--- a/python/mozbuild/mozbuild/schedules.py
+++ b/python/mozbuild/mozbuild/schedules.py
@@ -11,16 +11,37 @@ from __future__ import absolute_import,
# TODO: ideally these lists could be specified in moz.build itself
INCLUSIVE_COMPONENTS = [
'py-lint',
'js-lint',
'yaml-lint',
]
+INCLUSIVE_COMPONENTS = sorted(INCLUSIVE_COMPONENTS)
+
EXCLUSIVE_COMPONENTS = [
# os families
'android',
'linux',
'macosx',
'windows',
+ # test suites
+ 'awsy',
+ 'cppunittest',
+ 'firefox-ui',
+ 'geckoview',
+ 'gtest',
+ 'jittest',
+ 'marionette',
+ 'mochitest',
+ 'reftest',
+ 'robocop',
+ 'talos',
+ 'telemetry-tests-client',
+ 'xpcshell',
+ 'xpcshell-coverage',
+ 'web-platform-tests',
+ 'web-platform-tests-reftests',
+ 'web-platform-tests-wdspec',
]
+EXCLUSIVE_COMPONENTS = sorted(EXCLUSIVE_COMPONENTS)
ALL_COMPONENTS = INCLUSIVE_COMPONENTS + EXCLUSIVE_COMPONENTS
--- a/python/mozbuild/mozbuild/test/frontend/test_reader.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_reader.py
@@ -5,16 +5,17 @@
from __future__ import unicode_literals
import os
import sys
import unittest
from mozunit import main
+from mozbuild import schedules
from mozbuild.frontend.context import BugzillaComponent
from mozbuild.frontend.reader import (
BuildReaderError,
BuildReader,
)
from mozbuild.test.common import MockConfig
@@ -480,27 +481,27 @@ class TestBuildReader(unittest.TestCase)
with self.assertRaises(BuildReaderError):
reader.files_info(['foo.js'])
def test_schedules(self):
reader = self.reader('schedules')
info = reader.files_info(['somefile', 'foo.win', 'foo.osx', 'subd/aa.py', 'subd/yaml.py'])
# default: all exclusive, no inclusive
self.assertEqual(info['somefile']['SCHEDULES'].inclusive, [])
- self.assertEqual(info['somefile']['SCHEDULES'].exclusive, ['android', 'linux', 'macosx', 'windows'])
+ self.assertEqual(info['somefile']['SCHEDULES'].exclusive, schedules.EXCLUSIVE_COMPONENTS)
# windows-only
self.assertEqual(info['foo.win']['SCHEDULES'].inclusive, [])
self.assertEqual(info['foo.win']['SCHEDULES'].exclusive, ['windows'])
# osx-only
self.assertEqual(info['foo.osx']['SCHEDULES'].inclusive, [])
self.assertEqual(info['foo.osx']['SCHEDULES'].exclusive, ['macosx'])
# top-level moz.build specifies subd/**.py with an inclusive option
self.assertEqual(info['subd/aa.py']['SCHEDULES'].inclusive, ['py-lint'])
- self.assertEqual(info['subd/aa.py']['SCHEDULES'].exclusive, ['android', 'linux', 'macosx', 'windows'])
+ self.assertEqual(info['subd/aa.py']['SCHEDULES'].exclusive, schedules.EXCLUSIVE_COMPONENTS)
# Files('yaml.py') in subd/moz.build *overrides* Files('subdir/**.py')
self.assertEqual(info['subd/yaml.py']['SCHEDULES'].inclusive, ['yaml-lint'])
- self.assertEqual(info['subd/yaml.py']['SCHEDULES'].exclusive, ['android', 'linux', 'macosx', 'windows'])
+ self.assertEqual(info['subd/yaml.py']['SCHEDULES'].exclusive, schedules.EXCLUSIVE_COMPONENTS)
- self.assertEqual(info['subd/yaml.py']['SCHEDULES'].components,
- ['android', 'linux', 'macosx', 'windows', 'yaml-lint'])
+ self.assertEqual(set(info['subd/yaml.py']['SCHEDULES'].components),
+ set(schedules.EXCLUSIVE_COMPONENTS + ['yaml-lint']))
if __name__ == '__main__':
main()
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -934,17 +934,17 @@ def make_job_description(config, tests):
'kind': 'test',
'tier': test['tier'],
'platform': test.get('treeherder-machine-platform', test['build-platform']),
}
if test.get('when'):
jobdesc['when'] = test['when']
else:
- schedules = [platform_family(test['build-platform'])]
+ schedules = [suite, platform_family(test['build-platform'])]
if config.params['project'] != 'try':
# for non-try branches, include SETA
jobdesc['optimization'] = {'skip-unless-schedules-or-seta': schedules}
else:
# otherwise just use skip-unless-schedules
jobdesc['optimization'] = {'skip-unless-schedules': schedules}
run = jobdesc['run'] = {}
--- a/testing/firefox-ui/moz.build
+++ b/testing/firefox-ui/moz.build
@@ -4,8 +4,9 @@
FIREFOX_UI_FUNCTIONAL_MANIFESTS += ["tests/functional/manifest.ini"]
FIREFOX_UI_UPDATE_MANIFESTS += ["tests/update/manifest.ini"]
# TODO: Move to testing/marionette/puppeteer/firefox
PUPPETEER_FIREFOX_MANIFESTS += ["tests/puppeteer/manifest.ini"]
with Files("**"):
BUG_COMPONENT = ("Testing", "Firefox UI Tests")
+ SCHEDULES.exclusive = ["firefox-ui"]
--- a/testing/marionette/moz.build
+++ b/testing/marionette/moz.build
@@ -8,8 +8,11 @@ JAR_MANIFESTS += ["jar.mn"]
JS_PREFERENCE_FILES += ["prefs/marionette.js"]
MARIONETTE_UNIT_MANIFESTS += ["harness/marionette_harness/tests/unit/unit-tests.ini"]
MARIONETTE_WEBAPI_MANIFESTS += ["harness/marionette_harness/tests/webapi-tests.ini"]
XPCSHELL_TESTS_MANIFESTS += ["unit.ini"]
with Files("**"):
BUG_COMPONENT = ("Testing", "Marionette")
+
+with Files("harness/**"):
+ SCHEDULES.exclusive = ["marionette", "firefox-ui"]
--- a/testing/mochitest/moz.build
+++ b/testing/mochitest/moz.build
@@ -160,16 +160,17 @@ TEST_HARNESS_FILES.testing.mochitest.ice
TEST_HARNESS_FILES.testing.mochitest.websocketprocessbridge += [
'/testing/tools/websocketprocessbridge/websocketprocessbridge.py',
'/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt',
]
with Files("**"):
BUG_COMPONENT = ("Testing", "Mochitest")
+ SCHEDULES.exclusive = ['mochitest', 'robocop']
with Files("*remote*"):
BUG_COMPONENT = ("Firefox for Android", "Testing")
with Files("chrome/**"):
BUG_COMPONENT = ("Testing", "Mochitest Chrome")
with Files("chrome-harness.js"):
--- a/testing/moz.build
+++ b/testing/moz.build
@@ -1,10 +1,11 @@
with Files("awsy/**"):
BUG_COMPONENT = ("Testing", "AWSY")
+ SCHEDULES.exclusive = ["awsy"]
with Files("config/**"):
BUG_COMPONENT = ("Testing", "General")
with Files("*.py"):
BUG_COMPONENT = ("Testing", "General")
with Files("moz.build"):
@@ -13,16 +14,17 @@ with Files("moz.build"):
with Files("*.mk"):
BUG_COMPONENT = ("Testing", "General")
with Files("README.txt"):
BUG_COMPONENT = ("Testing", "General")
with Files("talos/**"):
BUG_COMPONENT = ("Testing", "Talos")
+ SCHEDULES.exclusive = ['talos']
with Files("talos/talos/tests/v8_7/**"):
BUG_COMPONENT = ("Core", "Javascript Engine")
with Files("talos/talos/tests/kraken/**"):
BUG_COMPONENT = ("Core", "Javascript Engine")
with Files("talos/talos/tests/a11y/**"):
@@ -70,25 +72,28 @@ with Files("tps/**"):
with Files("mozharness/**"):
BUG_COMPONENT = ("Release Engineering", "Mozharness")
with Files("config/tooltool-manifests/**"):
BUG_COMPONENT = ("Release Engineering", "Mozharness")
with Files("*cppunittest*"):
BUG_COMPONENT = ("Testing", "General")
+ SCHEDULES.exclusive = ['cppunittest']
with Files("gtest/**"):
BUG_COMPONENT = ("Testing", "General")
+ SCHEDULES.exclusive = ['gtest']
with Files("specialpowers/**"):
BUG_COMPONENT = ("Testing", "Mochitest")
with Files("crashtest/**"):
BUG_COMPONENT = ("Testing", "Reftest")
+ SCHEDULES.exclusive = ['reftest']
with Files("config/marionette*"):
BUG_COMPONENT = ("Testing", "Marionette")
with Files("config/mozbase_requirements.txt"):
BUG_COMPONENT = ("Testing", "Mozbase")
with Files("config/firefox_ui_requirements.txt"):
--- a/testing/web-platform/moz.build
+++ b/testing/web-platform/moz.build
@@ -18,16 +18,23 @@ TEST_HARNESS_FILES['web-platform'] += [
]
TEST_HARNESS_FILES['web-platform'].certs = [
'certs/cacert.pem',
'certs/web-platform.test.key',
'certs/web-platform.test.pem',
]
+with Files("**"):
+ SCHEDULES.exclusive = [
+ 'web-platform-tests',
+ 'web-platform-tests-reftests',
+ 'web-platform-tests-wdspec',
+ ]
+
with Files("update/**"):
BUG_COMPONENT = ("Testing", "web-platform-tests")
with Files("certs/**"):
BUG_COMPONENT = ("Testing", "web-platform-tests")
with Files("mach*"):
BUG_COMPONENT = ("Testing", "web-platform-tests")
--- a/testing/xpcshell/moz.build
+++ b/testing/xpcshell/moz.build
@@ -10,9 +10,10 @@ PYTHON_UNITTEST_MANIFESTS += [
'python.ini',
]
TESTING_JS_MODULES += [
'dbg-actors.js',
]
with Files("**"):
- BUG_COMPONENT = ("Testing", "XPCShell Harness")
\ No newline at end of file
+ BUG_COMPONENT = ("Testing", "XPCShell Harness")
+ SCHEDULES.exclusive = ['xpcshell', 'xpcshell-coverage']