Bug 1301978 - Enable reftest, crashtest, & jsreftest and use a transform on linux64-ccov tasks. r?jmaher draft
authorGreg Mierzwinski <gmierz2@outlook.com>
Sun, 22 Jan 2017 16:33:10 -0700
changeset 465991 764ba76be677c8d1f9ca66ae21dd42a99b20a4f7
parent 465990 6dccae211ae5fec6a1c1244b878ce0b93860154f
child 543296 967fe5d2cce13ac771268f1f1de01ee0df80b4c0
push id42763
push userbmo:gmierz2@outlook.com
push dateWed, 25 Jan 2017 03:28:10 +0000
reviewersjmaher
bugs1301978
milestone54.0a1
Bug 1301978 - Enable reftest, crashtest, & jsreftest and use a transform on linux64-ccov tasks. r?jmaher This bug makes it simpler to add new test suites to linux64-ccov with the help of a new transform and also cleans up the test suite definitions. It also enables reftest, crashtest and jsreftest at the same time. MozReview-Commit-ID: xCjKhUlfts
taskcluster/ci/test/test-sets.yml
taskcluster/ci/test/tests.yml
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/ci/test/test-sets.yml
+++ b/taskcluster/ci/test/test-sets.yml
@@ -65,19 +65,22 @@ talos:
 
 stylo-tests:
     - cppunit
     - crashtest
     - reftest-stylo
     - mochitest-style
 
 ccov-code-coverage-tests:
+    - crashtest
+    - jsreftest
     - mochitest
     - mochitest-browser-chrome
     - mochitest-devtools-chrome
+    - reftest
     - xpcshell
 
 jsdcov-code-coverage-tests:
     - mochitest-browser-chrome
     - mochitest-devtools-chrome
 
 ##
 # Test sets still being greened up in various ways
@@ -106,26 +109,16 @@ windows-vm-tests:
 
 # these tests currently run on hardware, but may migrate above when validated
 # note: on win, mochitest-a11y and mochitest-chrome come under mochitest-other
 # windows-hw-tests:
 #    - mochitest-clipboard
 #    - mochitest-gpu
 #    - mochitest-other
 
-ccov-code-coverage-tests:
-    - mochitest
-    - mochitest-browser-chrome
-    - mochitest-devtools-chrome
-    - xpcshell
-
-jsdcov-code-coverage-tests:
-    - mochitest-browser-chrome
-    - mochitest-devtools-chrome
-
 macosx64-tests-debug:
     - cppunit
     - crashtest
     # - gtest
     - jsreftest
     # - marionette
     # - mochitest
     # - mochitest-browser-chrome
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -54,16 +54,17 @@ crashtest:
     chunks:
         by-test-platform:
             android-4.3-arm7-api-15/debug: 10
             android.*: 4
             default: 1
     e10s:
         by-test-platform:
             windows.*: false # Bug 1304435
+            linux64-ccov/opt: false
             default: both
     mozharness:
         by-test-platform:
             android.*:
                 script: android_emulator_unittest.py
                 no-read-buildbot-config: true
                 config:
                     - android/androidarm_4_3.py
@@ -206,16 +207,17 @@ jsreftest:
             android.*: 6
             windows.*: 1
             default: 2
     e10s:
         by-test-platform:
             # Bug 1321782
             windows.*: false
             android.*: false
+            linux64-ccov/opt: false
             default: both
     max-run-time:
         by-test-platform:
             android.*: 7200
             default: 3600
     run-on-projects:
         by-test-platform:
             windows.*: ['mozilla-central', 'try']
@@ -294,20 +296,16 @@ mochitest:
     description: "Mochitest plain run"
     suite: mochitest/plain-chunked
     treeherder-symbol: tc-M()
     loopback-video: true
     instance-size:
         by-test-platform:
             android.*: xlarge
             default: legacy # Bug 1281241: migrating to m3.large instances
-    run-on-projects:
-        by-test-platform:
-            linux64-ccov/opt: []
-            default: ['all']
     chunks:
         by-test-platform:
             android-4.3-arm7-api-15/debug: 32
             android.*: 20
             macosx.*: 5
             windows.*: 5
             linux.*: 10
     e10s:
@@ -341,22 +339,17 @@ mochitest:
                             - unittests/win_taskcluster_unittest.py
                         macosx.*:
                             - remove_executables.py
                             - unittests/mac_unittest.py
                         linux.*:
                             - unittests/linux_unittest.py
                             - remove_executables.py
                 extra-options:
-                    by-test-platform:
-                        linux64-ccov/opt:
-                            - --mochitest-suite=plain-chunked
-                            - --code-coverage
-                        default:
-                            - --mochitest-suite=plain-chunked
+                    - --mochitest-suite=plain-chunked
 
 mochitest-a11y:
     description: "Mochitest a11y run"
     suite: mochitest/a11y
     treeherder-symbol: tc-M(a11y)
     loopback-video: true
     e10s: false
     mozharness:
@@ -382,17 +375,16 @@ mochitest-browser-chrome:
         by-test-platform:
             linux64-jsdcov/opt: mochitest/browser-chrome-coverage
             default: mochitest/browser-chrome-chunked
     treeherder-symbol: tc-M(bc)
     loopback-video: true
     run-on-projects:
         by-test-platform:
             linux64-jsdcov/opt: []
-            linux64-ccov/opt: []
             default: ['all']
     chunks:
         by-test-platform:
             linux64-jsdcov/opt: 35
             linux64/debug: 12
             linux32/debug: 12
             linux64-asan/opt: 10
             default: 7
@@ -420,19 +412,16 @@ mochitest-browser-chrome:
                     - unittests/mac_unittest.py
                 linux.*:
                     - unittests/linux_unittest.py
                     - remove_executables.py
         extra-options:
             by-test-platform:
                 linux64-jsdcov/opt:
                     - --mochitest-suite=browser-chrome-coverage
-                linux64-ccov/opt:
-                    - --mochitest-suite=browser-chrome-chunked
-                    - --code-coverage
                 default:
                     - --mochitest-suite=browser-chrome-chunked
     # Bug 1281241: migrating to m3.large instances
     instance-size:
         by-test-platform:
             linux64-jsdcov/opt: xlarge
             linux64-ccov/opt: xlarge
             default: legacy
@@ -563,17 +552,16 @@ mochitest-devtools-chrome:
     loopback-video: true
     max-run-time: 5400
     chunks:
         by-test-platform:
             windows.*: 8
             default: 10
     run-on-projects:
         by-test-platform:
-            linux64-ccov/opt: []
             linux64-jsdcov/opt: []
             windows.*: ['mozilla-central', 'try']
             default: ['all']
     e10s:
         by-test-platform:
             linux64-ccov/opt: false
             linux64-jsdcov/opt: false
             # Bug 1304433: mochitest-devtools-chrome (e10s) not greened on windows
@@ -589,19 +577,16 @@ mochitest-devtools-chrome:
                 macosx.*:
                     - remove_executables.py
                     - unittests/mac_unittest.py
                 linux.*:
                     - unittests/linux_unittest.py
                     - remove_executables.py
         extra-options:
             by-test-platform:
-                linux64-ccov/opt:
-                    - --mochitest-suite=mochitest-devtools-chrome-chunked
-                    - --code-coverage
                 linux64-jsdcov/opt:
                     - --mochitest-suite=mochitest-devtools-chrome-coverage
                 default:
                     - --mochitest-suite=mochitest-devtools-chrome-chunked
     instance-size:
         by-test-platform:
             # Bug 1281241: migrating to m3.large instances
             linux64-asan/opt: legacy
@@ -846,16 +831,20 @@ reftest:
             android-4.3-arm7-api-15/debug: 48
             android.*: 16
             macosx.*: 1
             default: 8
     max-run-time:
         by-test-platform:
             android.*: 10800
             default: 3600
+    e10s:
+        by-test-platform:
+            linux64-ccov/opt: false
+            default: both
     mozharness:
         by-test-platform:
             android.*:
                 script: android_emulator_unittest.py
                 no-read-buildbot-config: true
                 config:
                     - android/androidarm_4_3.py
                     - remove_executables.py
@@ -1184,20 +1173,16 @@ web-platform-tests-wdspec:
                     - remove_executables.py
         extra-options:
             - --test-type=wdspec
 
 xpcshell:
     description: "xpcshell test run"
     suite: xpcshell
     treeherder-symbol: tc-X()
-    run-on-projects:
-        by-test-platform:
-            linux64-ccov/opt: []
-            default: ['all']
     chunks:
         by-test-platform:
             linux64/debug: 10
             android-4.2-x86/opt: 4
             android.*: 6
             # windows.*: 1
             macosx.*: 1
             default: 8
@@ -1235,14 +1220,9 @@ xpcshell:
                             - unittests/win_taskcluster_unittest.py
                         macosx.*:
                             - remove_executables.py
                             - unittests/mac_unittest.py
                         linux.*:
                             - unittests/linux_unittest.py
                             - remove_executables.py
                 extra-options:
-                    by-test-platform:
-                        linux64-ccov/opt:
-                            - --xpcshell-suite=xpcshell
-                            - --code-coverage
-                        default:
-                            - --xpcshell-suite=xpcshell
+                    - --xpcshell-suite=xpcshell
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -474,16 +474,26 @@ def handle_keyed_by(config, tests):
     ]
     for test in tests:
         for field in fields:
             resolve_keyed_by(test, field, item_name=test['test-name'])
         yield test
 
 
 @transforms.add
+def enable_code_coverage(config, tests):
+    """Enable code coverage for linux64-ccov/opt build-platforms"""
+    for test in tests:
+        if test['build-platform'] == 'linux64-ccov/opt':
+            test['mozharness'].setdefault('extra-options', []).append('--code-coverage')
+            test['run-on-projects'] = []
+        yield test
+
+
+@transforms.add
 def split_e10s(config, tests):
     for test in tests:
         e10s = test['e10s']
 
         test.setdefault('attributes', {})
         test['e10s'] = False
         test['attributes']['e10s'] = False