Bug 1436037 - [ci] Run mozbase and mozlint python-test tasks on OSX, r=jmaher
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 21 Dec 2018 13:43:12 +0000
changeset 451677 0b74d496b79796810a8a30846f88717bb491278d
parent 451676 6ffe1e52008f3505997eab1e9c231787a2a928e5
child 451678 6745799b8cbfda0e24d5e0b65a75468db7d8b62d
push id35251
push userccoroiu@mozilla.com
push dateFri, 21 Dec 2018 21:54:30 +0000
treeherdermozilla-central@74101900e7d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1436037
milestone66.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 1436037 - [ci] Run mozbase and mozlint python-test tasks on OSX, r=jmaher Differential Revision: https://phabricator.services.mozilla.com/D14901
taskcluster/ci/source-test/python.yml
taskcluster/taskgraph/transforms/job/python_test.py
testing/mozbase/mozinstall/tests/manifest.ini
testing/mozbase/moztest/moztest/resolve.py
tools/lint/test/python.ini
--- a/taskcluster/ci/source-test/python.yml
+++ b/taskcluster/ci/source-test/python.yml
@@ -1,14 +1,15 @@
 job-defaults:
     platform: linux64/opt
     always-target: true
     worker-type:
         by-platform:
             linux64.*: aws-provisioner-v1/gecko-t-linux-xlarge
+            macosx64.*: releng-hardware/gecko-t-osx-1010
             windows10-64.*: aws-provisioner-v1/gecko-t-win10-64
     worker:
         by-platform:
             linux64.*:
                 docker-image: {in-tree: "lint"}
                 max-run-time: 3600
             default:
                 max-run-time: 3600
@@ -92,16 +93,17 @@ mochitest-harness:
             - 'testing/mozharness/mozharness/mozilla/structuredlog.py'
             - 'testing/mozharness/mozharness/mozilla/testing/errors.py'
             - 'testing/profiles/**'
 
 mozbase:
     description: testing/mozbase unit tests
     platform:
         - linux64/opt
+        - macosx64/opt
         - windows10-64/opt
     python-version: [2, 3]
     treeherder:
         symbol: mb
     run:
         using: python-test
         subsuite: mozbase
     when:
@@ -121,16 +123,17 @@ mozharness:
     when:
         files-changed:
             - 'testing/mozharness/**'
 
 mozlint:
     description: python/mozlint unit tests
     platform:
         - linux64/opt
+        - macosx64/opt
         - windows10-64/opt
     python-version: [2]
     treeherder:
         symbol: ml
     run:
         using: python-test
         subsuite: mozlint
     when:
--- a/taskcluster/taskgraph/transforms/job/python_test.py
+++ b/taskcluster/taskgraph/transforms/job/python_test.py
@@ -30,15 +30,20 @@ defaults = {
     'subsuite': 'default',
 }
 
 
 @run_job_using('docker-worker', 'python-test', schema=python_test_schema, defaults=defaults)
 @run_job_using('generic-worker', 'python-test', schema=python_test_schema, defaults=defaults)
 def configure_python_test(config, job, taskdesc):
     run = job['run']
+    worker = job['worker']
+
+    if worker['os'] == 'macosx' and run['python-version'] == 3:
+        # OSX hosts can't seem to find python 3 on their own
+        run['python-version'] = '/usr/local/bin/python3'
 
     # defer to the mach implementation
     run['mach'] = 'python-test --python {python-version} --subsuite {subsuite}'.format(**run)
     run['using'] = 'mach'
     del run['python-version']
     del run['subsuite']
-    configure_taskdesc_for_run(config, job, taskdesc, job['worker']['implementation'])
+    configure_taskdesc_for_run(config, job, taskdesc, worker['implementation'])
--- a/testing/mozbase/mozinstall/tests/manifest.ini
+++ b/testing/mozbase/mozinstall/tests/manifest.ini
@@ -1,7 +1,9 @@
 [DEFAULT]
 subsuite = mozbase
 skip-if = python == 3
 [test_binary.py]
+skip-if = os == "mac"
 [test_install.py]
+skip-if = os == "mac"  # intermittent
 [test_is_installer.py]
 [test_uninstall.py]
--- a/testing/mozbase/moztest/moztest/resolve.py
+++ b/testing/mozbase/moztest/moztest/resolve.py
@@ -404,17 +404,17 @@ class TestMetadata(object):
 
         paths = paths or []
         paths = [mozpath.normpath(p) for p in paths]
         if not paths:
             paths = [None]
 
         candidate_paths = set()
 
-        if any(self.is_wpt_path(path) for path in paths):
+        if flavor in (None, 'web-platform-tests') and any(self.is_wpt_path(p) for p in paths):
             self.add_wpt_manifest_data()
 
         for path in sorted(paths):
             if path is None:
                 candidate_paths |= set(self._tests_by_path.keys())
                 continue
 
             if '*' in path:
--- a/tools/lint/test/python.ini
+++ b/tools/lint/test/python.ini
@@ -1,7 +1,8 @@
 [DEFAULT]
 subsuite = mozlint
 skip-if = python == 3
 
 [test_eslint.py]
-skip-if = os == "win"  # node not installed on worker
+skip-if = os == "win" || os == "mac"  # node not installed on worker
 [test_flake8.py]
+skip-if = os == "mac"  # pip unable to find 'flake8==3.5.0'