Bug 1403322: Switch jsreftests, jittests, test-verify to SCHEDULES; r=ahal
authorDustin J. Mitchell <dustin@mozilla.com>
Wed, 20 Dec 2017 00:39:21 +0000
changeset 398289 976c7e62b6378202ad609d74bb7af904da83ac9a
parent 398288 c01ea7a845672c90d3ef85168bad3ed5848825d6
child 398290 e4ca69cab96aad47b7506a70238c9d0f93d61e04
push id33213
push userebalazs@mozilla.com
push dateTue, 09 Jan 2018 09:51:47 +0000
treeherdermozilla-central@4248602674ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1403322
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1403322: Switch jsreftests, jittests, test-verify to SCHEDULES; r=ahal ..and remove support for when.files-changed in the test kind. It is still used for other kinds, and that will be addressed in other bugs. This is re-landing of this bug, now without running test-verify excessively. MozReview-Commit-ID: GBilXAktICZ
js/moz.build
moz.build
python/mozbuild/mozbuild/schedules.py
taskcluster/ci/test/compiled.yml
taskcluster/ci/test/misc.yml
taskcluster/ci/test/reftest.yml
taskcluster/ci/test/web-platform.yml
taskcluster/taskgraph/transforms/tests.py
testing/web-platform/moz.build
--- a/js/moz.build
+++ b/js/moz.build
@@ -6,8 +6,14 @@ with Files("**"):
     BUG_COMPONENT = component_engine
 
 for header in ('GCAnnotations.h', 'GCAPI.h', 'HeapAPI.h', 'RootingAPI.h', 'SliceBudget.h', 'SweepingAPI.h', 'TraceKind.h', 'TracingAPI.h', 'WeakMapPtr.h', 'GCHashTable.h', 'GCPolicyAPI.h', 'GCVariant.h', 'GCVector.h'):
     with Files('public/' + header):
         BUG_COMPONENT = component_gc
 
 with Files('public/TrackedOptimizationInfo.h'):
     BUG_COMPONENT = component_jit
+
+with Files("src/**"):
+    SCHEDULES.inclusive += ['jittest', 'jsreftest']
+
+with Files("public/**"):
+    SCHEDULES.inclusive += ['jittest', 'jsreftest']
--- a/moz.build
+++ b/moz.build
@@ -50,16 +50,28 @@ with Files('README.txt'):
 
 with Files("nsprpub/**"):
     BUG_COMPONENT = ("NSPR", "NSPR")
 
 with Files('**/Makefile.in'):
     BUG_COMPONENT = ('Core', 'Build Config')
     FINAL = True
 
+with Files("**/*.js"):
+    SCHEDULES.inclusive += ['test-verify']
+
+with Files("**/*.html"):
+    SCHEDULES.inclusive += ['test-verify']
+
+with Files("**/*.xhtml"):
+    SCHEDULES.inclusive += ['test-verify']
+
+with Files("**/*.xul"):
+    SCHEDULES.inclusive += ['test-verify']
+
 CONFIGURE_SUBST_FILES += [
     'config/autoconf.mk',
     'config/emptyvars.mk',
 ]
 
 if CONFIG['ENABLE_CLANG_PLUGIN']:
     DIRS += ['build/clang-plugin']
 
--- a/python/mozbuild/mozbuild/schedules.py
+++ b/python/mozbuild/mozbuild/schedules.py
@@ -10,32 +10,36 @@ skip-unless-schedules optimizations in t
 from __future__ import absolute_import, unicode_literals, print_function
 
 # TODO: ideally these lists could be specified in moz.build itself
 
 INCLUSIVE_COMPONENTS = [
     'py-lint',
     'js-lint',
     'yaml-lint',
+    # inclusive test suites -- these *only* run when certain files have changed
+    'jittest',
+    'test-verify',
+    'test-verify-wpt',
+    'jsreftest',
 ]
 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',
--- a/taskcluster/ci/test/compiled.yml
+++ b/taskcluster/ci/test/compiled.yml
@@ -70,16 +70,12 @@ jittest:
             macosx.*: 1
             default: 6
     mozharness:
         chunked:
             by-test-platform:
                 windows.*: false
                 macosx.*: false
                 default: true
-    when:
-        files-changed:
-            - js/src/**
-            - js/public/**
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: default
--- a/taskcluster/ci/test/misc.yml
+++ b/taskcluster/ci/test/misc.yml
@@ -49,17 +49,17 @@ telemetry-tests-client:
         config:
             by-test-platform:
                 linux.*:
                     - remove_executables.py
                 windows.*: []
 
 test-verify:
     description: "Extra verification of tests modified on this push"
-    suite: test-verification
+    suite: test-verify
     treeherder-symbol: tc(TV)
     loopback-video: true
     instance-size:
         by-test-platform:
             android.*: xlarge
             default: default
     max-run-time: 5400
     allow-software-gl-layers: false
@@ -87,14 +87,8 @@ test-verify:
                 macosx.*:
                     - remove_executables.py
                     - unittests/mac_unittest.py
                 windows.*:
                     - unittests/win_taskcluster_unittest.py
         no-read-buildbot-config: true
         extra-options:
             - --verify
-    when:
-        files-changed:
-            - '**/*.js'
-            - '**/*.html'
-            - '**/*.xhtml'
-            - '**/*.xul'
--- a/taskcluster/ci/test/reftest.yml
+++ b/taskcluster/ci/test/reftest.yml
@@ -70,20 +70,16 @@ jsreftest:
         by-test-platform:
             linux64-jsdcov/opt: false
             windows10-64/debug: both
             default: true
     max-run-time:
         by-test-platform:
             android.*: 7200
             default: 3600
-    when:
-        files-changed:
-            - js/src/**
-            - js/public/**
     tier:
         by-test-platform:
             linux64-qr/.*: 1
             windows10-64-asan.*: 3
             default: default
 
 reftest:
     description: "Reftest run"
--- a/taskcluster/ci/test/web-platform.yml
+++ b/taskcluster/ci/test/web-platform.yml
@@ -139,11 +139,8 @@ test-verify-wpt:
             default: built-projects
     tier:
         by-test-platform:
             windows10-64-asan.*: 3
             default: 2
     mozharness:
         extra-options:
             - --verify
-    when:
-        files-changed:
-            - 'testing/web-platform/tests/**'
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -373,21 +373,16 @@ test_description_schema = Schema({
     'test-platform': basestring,
 
     # the name of the test (the key in tests.yml)
     'test-name': basestring,
 
     # the product name, defaults to firefox
     Optional('product'): basestring,
 
-    # conditional files to determine when these tests should be run
-    Optional('when'): Any({
-        Optional('files-changed'): [basestring],
-    }),
-
     Optional('worker-type'): optionally_keyed_by(
         'test-platform',
         Any(basestring, None),
     ),
 
 }, required=True)
 
 
@@ -666,17 +661,17 @@ def handle_suite_category(config, tests)
             suite = flavor = test['suite']
 
         test.setdefault('attributes', {})
         test['attributes']['unittest_suite'] = suite
         test['attributes']['unittest_flavor'] = flavor
 
         script = test['mozharness']['script']
         category_arg = None
-        if suite == 'test-verification':
+        if suite == 'test-verify':
             pass
         elif script == 'android_emulator_unittest.py':
             category_arg = '--test-suite'
         elif script == 'desktop_unittest.py':
             category_arg = '--{}-suite'.format(suite)
 
         if category_arg:
             test['mozharness'].setdefault('extra-options', [])
@@ -689,17 +684,16 @@ def handle_suite_category(config, tests)
 
 @transforms.add
 def enable_code_coverage(config, tests):
     """Enable code coverage for the linux64-ccov/opt & linux64-jsdcov/opt & win64-ccov/debug
     build-platforms"""
     for test in tests:
         if 'ccov' in test['build-platform'] and not test['test-name'].startswith('test-verify'):
             test['mozharness'].setdefault('extra-options', []).append('--code-coverage')
-            test['when'] = {}
             test['instance-size'] = 'xlarge'
             # Ensure we don't run on inbound/autoland/beta, but if the test is try only, ignore it
             if 'mozilla-central' in test['run-on-projects'] or \
                     test['run-on-projects'] == 'built-projects':
                 test['run-on-projects'] = ['mozilla-central', 'try']
 
             if 'talos' in test['test-name']:
                 test['max-run-time'] = 7200
@@ -1003,34 +997,31 @@ def make_job_description(config, tests):
         }
         jobdesc['treeherder'] = {
             'symbol': test['treeherder-symbol'],
             'kind': 'test',
             'tier': test['tier'],
             'platform': test.get('treeherder-machine-platform', test['build-platform']),
         }
 
-        if test.get('when'):
-            jobdesc['when'] = test['when']
+        suite = attributes['unittest_suite']
+        if suite in INCLUSIVE_COMPONENTS:
+            # if this is an "inclusive" test, then all files which might
+            # cause it to run are annotated with SCHEDULES in moz.build,
+            # so do not include the platform or any other components here
+            schedules = [suite]
         else:
-            suite = attributes['unittest_suite']
-            if suite in INCLUSIVE_COMPONENTS:
-                # if this is an "inclusive" test, then all files which might
-                # cause it to run are annotated with SCHEDULES in moz.build,
-                # so do not include the platform or any other components here
-                schedules = [suite]
-            else:
-                schedules = [suite, 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}
+        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'] = {}
         run['using'] = 'mozharness-test'
         run['test'] = test
 
         jobdesc['worker-type'] = test.pop('worker-type')
 
         yield jobdesc
--- a/testing/web-platform/moz.build
+++ b/testing/web-platform/moz.build
@@ -94,16 +94,20 @@ with Files("mach*"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")
 
 with Files("*.py"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")
 
 with Files("tests/*.md"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")
 
+with Files("tests/**"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
+    SCHEDULES.inclusive += ['test-verify-wpt']
+
 with Files("tests/LICENSE"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")
 
 with Files("tests/check_stability.ini"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")
 
 with Files("tests/config.default.json"):
     BUG_COMPONENT = ("Testing", "web-platform-tests")