Bug 1336910 - Enable linux64-ccov for gtest, marionette & web-platform-tests; r?jmaher draft enable-ccov-collection
authorMadeleine Chercover <madeleinechercover@me.com>
Sun, 05 Feb 2017 23:34:12 -0800
branchenable-ccov-collection
changeset 479456 0020ad57fa37104c728e1e24c868bc614a15d6dc
parent 479455 12c02bf624c48903b155428f7c8a419ba7a333a6
child 724638 0653dd90c6b7531c2a6b5be9356182b444028d11
push id44263
push userbmo:madeleinechercover@me.com
push dateMon, 06 Feb 2017 18:53:13 +0000
reviewersjmaher
bugs1336910
milestone54.0a1
Bug 1336910 - Enable linux64-ccov for gtest, marionette & web-platform-tests; r?jmaher MozReview-Commit-ID: H2yUyPohceG
taskcluster/ci/test/test-sets.yml
taskcluster/ci/test/tests.yml
testing/mozharness/scripts/marionette.py
testing/mozharness/scripts/web_platform_tests.py
--- a/taskcluster/ci/test/test-sets.yml
+++ b/taskcluster/ci/test/test-sets.yml
@@ -79,21 +79,24 @@ qr-tests:
     - jsreftest
     - mochitest-a11y
     - reftest
     - reftest-no-accel
     - xpcshell
 
 ccov-code-coverage-tests:
     - crashtest
+    - gtest
     - jsreftest
+    - marionette
     - mochitest
     - mochitest-browser-chrome
     - mochitest-devtools-chrome
     - reftest
+    - web-platform-tests
     - xpcshell
 
 jsdcov-code-coverage-tests:
     - mochitest-browser-chrome
     - mochitest-devtools-chrome
     - xpcshell
 
 ##
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -317,26 +317,31 @@ marionette:
     treeherder-symbol: tc(Mn)
     max-run-time:
         by-test-platform:
             android.*: 3600
             default: 5400
     instance-size:
         by-test-platform:
             android.*: xlarge
+            linux64-ccov/opt: xlarge
             default: default
     docker-image: {"in-tree": "desktop1604-test"}
     tier:
         by-test-platform:
             android.*: 3
             default: default
     chunks:
         by-test-platform:
             android.*: 10
             default: 1
+    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
@@ -1172,16 +1177,20 @@ talos-tp5o:
 web-platform-tests:
     description: "Web platform test run"
     suite: web-platform-tests
     treeherder-symbol: tc-W()
     chunks:
       by-test-platform:
         macosx.*: 5
         default: 12
+    e10s:
+        by-test-platform:
+            linux64-ccov/opt: false
+            default: both
     max-run-time: 7200
     instance-size: xlarge
     docker-image: {"in-tree": "desktop1604-test"}
     checkout: true
     run-on-projects:
         by-test-platform:
             windows.*: ['mozilla-central', 'try']
             default: ['all']
--- a/testing/mozharness/scripts/marionette.py
+++ b/testing/mozharness/scripts/marionette.py
@@ -17,23 +17,27 @@ from mozharness.base.errors import TarEr
 from mozharness.base.log import INFO, ERROR, WARNING
 from mozharness.base.script import PreScriptAction
 from mozharness.base.transfer import TransferMixin
 from mozharness.base.vcs.vcsbase import MercurialScript
 from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options
 from mozharness.mozilla.testing.errors import LogcatErrorList
 from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
 from mozharness.mozilla.testing.unittest import TestSummaryOutputParserHelper
+from mozharness.mozilla.testing.codecoverage import (
+    CodeCoverageMixin,
+    code_coverage_config_options
+)
 from mozharness.mozilla.structuredlog import StructuredOutputParser
 
 # TODO: we could remove emulator specific code after B2G ICS emulator buildbot
 #       builds is turned off, Bug 1209180.
 
 
-class MarionetteTest(TestingMixin, MercurialScript, BlobUploadMixin, TransferMixin):
+class MarionetteTest(TestingMixin, MercurialScript, BlobUploadMixin, TransferMixin, CodeCoverageMixin):
     config_options = [[
         ["--application"],
         {"action": "store",
          "dest": "application",
          "default": None,
          "help": "application name of binary"
          }
     ], [
@@ -89,17 +93,18 @@ class MarionetteTest(TestingMixin, Mercu
     ], [
        ["--allow-software-gl-layers"],
        {"action": "store_true",
         "dest": "allow_software_gl_layers",
         "default": False,
         "help": "Permits a software GL implementation (such as LLVMPipe) to use the GL compositor."
         }
      ]] + copy.deepcopy(testing_config_options) \
-        + copy.deepcopy(blobupload_config_options)
+        + copy.deepcopy(blobupload_config_options) \
+        + copy.deepcopy(code_coverage_config_options)
 
     error_list = [
         {'substr': 'FAILED (errors=', 'level': WARNING},
         {'substr': r'''Could not successfully complete transport of message to Gecko, socket closed''', 'level': ERROR},
         {'substr': r'''Connection to Marionette server is lost. Check gecko''', 'level': ERROR},
         {'substr': 'Timeout waiting for marionette on port', 'level': ERROR},
         {'regex': re.compile(r'''(TEST-UNEXPECTED|PROCESS-CRASH)'''), 'level': ERROR},
         {'regex': re.compile(r'''(\b((?!Marionette|TestMarionette|NoSuchElement|XPathLookup|NoSuchWindow|StaleElement|ScriptTimeout|ElementNotVisible|NoSuchFrame|InvalidResponse|Javascript|Timeout|InvalidElementState|NoAlertPresent|InvalidCookieDomain|UnableToSetCookie|InvalidSelector|MoveTargetOutOfBounds)\w*)Exception)'''), 'level': ERROR},
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -12,21 +12,25 @@ import sys
 
 # load modules from parent dir
 sys.path.insert(1, os.path.dirname(sys.path[0]))
 
 from mozharness.base.script import PreScriptAction
 from mozharness.base.vcs.vcsbase import MercurialScript
 from mozharness.mozilla.blob_upload import BlobUploadMixin, blobupload_config_options
 from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options, TOOLTOOL_PLATFORM_DIR
+from mozharness.mozilla.testing.codecoverage import (
+    CodeCoverageMixin,
+    code_coverage_config_options
+)
 
 from mozharness.mozilla.structuredlog import StructuredOutputParser
 from mozharness.base.log import INFO
 
-class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin):
+class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin, CodeCoverageMixin):
     config_options = [
         [['--test-type'], {
             "action": "extend",
             "dest": "test_type",
             "help": "Specify the test types to run."}
          ],
         [['--e10s'], {
             "action": "store_true",
@@ -45,17 +49,18 @@ class WebPlatformTest(TestingMixin, Merc
             "help": "Number of this chunk"}
          ],
         [["--allow-software-gl-layers"], {
             "action": "store_true",
             "dest": "allow_software_gl_layers",
             "default": False,
             "help": "Permits a software GL implementation (such as LLVMPipe) to use the GL compositor."}]
     ] + copy.deepcopy(testing_config_options) + \
-        copy.deepcopy(blobupload_config_options)
+        copy.deepcopy(blobupload_config_options) + \
+        copy.deepcopy(code_coverage_config_options)
 
     def __init__(self, require_config_file=True):
         super(WebPlatformTest, self).__init__(
             config_options=self.config_options,
             all_actions=[
                 'clobber',
                 'read-buildbot-config',
                 'download-and-extract',