From fea1d97f08833994b91e68158fd4462f1fb485c3 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Fri, 21 Dec 2018 13:43:12 +0000 Subject: [PATCH] Bug 1436037 - [ci] Run mozbase and mozlint python-test tasks on OSX, r=jmaher Differential Revision: https://phabricator.services.mozilla.com/D14901 --HG-- extra : moz-landing-system : lando --- taskcluster/ci/source-test/python.yml | 3 +++ taskcluster/taskgraph/transforms/job/python_test.py | 7 ++++++- testing/mozbase/mozinstall/tests/manifest.ini | 2 ++ testing/mozbase/moztest/moztest/resolve.py | 2 +- tools/lint/test/python.ini | 3 ++- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/taskcluster/ci/source-test/python.yml b/taskcluster/ci/source-test/python.yml index 4130022c3428..36ab89a7497e 100644 --- a/taskcluster/ci/source-test/python.yml +++ b/taskcluster/ci/source-test/python.yml @@ -4,6 +4,7 @@ job-defaults: 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: @@ -97,6 +98,7 @@ mozbase: description: testing/mozbase unit tests platform: - linux64/opt + - macosx64/opt - windows10-64/opt python-version: [2, 3] treeherder: @@ -126,6 +128,7 @@ mozlint: description: python/mozlint unit tests platform: - linux64/opt + - macosx64/opt - windows10-64/opt python-version: [2] treeherder: diff --git a/taskcluster/taskgraph/transforms/job/python_test.py b/taskcluster/taskgraph/transforms/job/python_test.py index 10dafb225ba4..a2afe11f5d61 100644 --- a/taskcluster/taskgraph/transforms/job/python_test.py +++ b/taskcluster/taskgraph/transforms/job/python_test.py @@ -35,10 +35,15 @@ 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']) diff --git a/testing/mozbase/mozinstall/tests/manifest.ini b/testing/mozbase/mozinstall/tests/manifest.ini index 8c8875839f89..0abcf975a329 100644 --- a/testing/mozbase/mozinstall/tests/manifest.ini +++ b/testing/mozbase/mozinstall/tests/manifest.ini @@ -2,6 +2,8 @@ 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] diff --git a/testing/mozbase/moztest/moztest/resolve.py b/testing/mozbase/moztest/moztest/resolve.py index 309c5697b485..bc03cc3ff17d 100644 --- a/testing/mozbase/moztest/moztest/resolve.py +++ b/testing/mozbase/moztest/moztest/resolve.py @@ -409,7 +409,7 @@ class TestMetadata(object): 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): diff --git a/tools/lint/test/python.ini b/tools/lint/test/python.ini index 4d8120c1a590..774abf5a3bf7 100644 --- a/tools/lint/test/python.ini +++ b/tools/lint/test/python.ini @@ -3,5 +3,6 @@ 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'