Bug 1436037 - [python] Create Windows python-test tasks, r=gps
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 05 Dec 2018 19:20:16 +0000
changeset 505926 c88d2cb951ca8b2622ed90f921194902bd4bb712
parent 505925 df5747b8931be1f0ac57aa34883f37db8985dd6d
child 505927 73f92838946aac0aab5760bada1a1e8e2218a3e1
push id10301
push userarchaeopteryx@coole-files.de
push dateThu, 06 Dec 2018 16:36:14 +0000
treeherdermozilla-beta@7d2f3c71997c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1436037
milestone65.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 - [python] Create Windows python-test tasks, r=gps The following python-test paths are being moved out of 'make check' and into their own task: - python/mozlint - testing/mozbase - tools/lint The following python-test paths previously did not run on Windows: - python/mozterm - testing/marionette - testing/raptor - tools/tryselect Differential Revision: https://phabricator.services.mozilla.com/D10759
python/mozlint/test/python.ini
taskcluster/ci/source-test/python.yml
testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
testing/mozbase/manifestparser/tests/manifest.ini
testing/mozbase/mozcrash/tests/manifest.ini
testing/mozbase/mozdebug/tests/manifest.ini
testing/mozbase/mozdevice/tests/manifest.ini
testing/mozbase/mozfile/tests/manifest.ini
testing/mozbase/mozhttpd/tests/manifest.ini
testing/mozbase/mozinfo/tests/manifest.ini
testing/mozbase/mozinstall/tests/manifest.ini
testing/mozbase/mozlog/tests/manifest.ini
testing/mozbase/moznetwork/tests/manifest.ini
testing/mozbase/mozprocess/tests/manifest.ini
testing/mozbase/mozprofile/tests/manifest.ini
testing/mozbase/mozrunner/tests/manifest.ini
testing/mozbase/mozsystemmonitor/tests/manifest.ini
testing/mozbase/moztest/tests/manifest.ini
testing/mozbase/mozversion/tests/manifest.ini
tools/lint/test/python.ini
--- a/python/mozlint/test/python.ini
+++ b/python/mozlint/test/python.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozlint, os == "linux"
+subsuite = mozlint
 skip-if = python == 3
 
 [test_cli.py]
 [test_editor.py]
 [test_formatters.py]
 [test_parser.py]
 [test_pathutils.py]
 [test_result.py]
--- a/taskcluster/ci/source-test/python.yml
+++ b/taskcluster/ci/source-test/python.yml
@@ -1,19 +1,22 @@
 job-defaults:
     platform: linux64/opt
     always-target: true
     worker-type:
         by-platform:
             linux64.*: aws-provisioner-v1/gecko-t-linux-xlarge
+            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
     treeherder:
         kind: test
         tier: 2
     run:
         using: mach
     when:
         files-changed:
             - 'config/mozunit/**'
@@ -29,16 +32,19 @@ taskgraph-tests:
         subsuite: taskgraph
     when:
         files-changed:
             - 'taskcluster/**/*.py'
             - 'python/mach/**/*.py'
 
 marionette-harness:
     description: testing/marionette/harness unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2]
     treeherder:
         symbol: mnh
     run:
         using: python-test
         subsuite: marionette-harness
     when:
         files-changed:
@@ -84,16 +90,19 @@ mochitest-harness:
             - 'testing/mozbase/moztest/moztest/selftest/**'
             - 'testing/mozharness/mozharness/base/log.py'
             - 'testing/mozharness/mozharness/mozilla/structuredlog.py'
             - 'testing/mozharness/mozharness/mozilla/testing/errors.py'
             - 'testing/profiles/**'
 
 mozbase:
     description: testing/mozbase unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2, 3]
     treeherder:
         symbol: mb
     run:
         using: python-test
         subsuite: mozbase
     when:
         files-changed:
@@ -110,16 +119,19 @@ mozharness:
             cd /builds/worker/checkouts/gecko/testing/mozharness &&
             /usr/local/bin/tox -e py27-hg4.3
     when:
         files-changed:
             - 'testing/mozharness/**'
 
 mozlint:
     description: python/mozlint unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2]
     treeherder:
         symbol: ml
     run:
         using: python-test
         subsuite: mozlint
     when:
         files-changed:
@@ -135,16 +147,19 @@ mozrelease:
         using: python-test
         subsuite: mozrelease
     when:
         files-changed:
             - 'python/mozrelease/**'
 
 mozterm:
     description: python/mozterm unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2, 3]
     treeherder:
         symbol: term
     run:
         using: python-test
         subsuite: mozterm
     when:
         files-changed:
@@ -159,16 +174,19 @@ mozversioncontrol:
         using: python-test
         subsuite: mozversioncontrol
     when:
         files-changed:
             - 'python/mozversioncontrol/**'
 
 raptor:
     description: testing/raptor unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2]
     treeherder:
         symbol: rap
     run:
         using: python-test
         subsuite: raptor
     when:
         files-changed:
@@ -210,16 +228,19 @@ reftest-harness:
             - 'layout/tools/reftest/**'
             - 'testing/mozbase/moztest/moztest/selftest/**'
             - 'testing/mozharness/mozharness/base/log.py'
             - 'testing/mozharness/mozharness/mozilla/structuredlog.py'
             - 'testing/mozharness/mozharness/mozilla/testing/errors.py'
 
 tryselect:
     description: tools/tryselect unit tests
+    platform:
+        - linux64/opt
+        - windows10-64/opt
     python-version: [2]
     treeherder:
         symbol: try
     run:
         using: python-test
         subsuite: try
     when:
         files-changed:
--- a/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
+++ b/testing/marionette/harness/marionette_harness/tests/harness_unit/test_marionette_runner.py
@@ -1,14 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import
 
+import os
+
 import manifestparser
 import mozunit
 import pytest
 
 from mock import Mock, patch, mock_open, sentinel, DEFAULT
 
 from marionette_harness.runtests import MarionetteTestRunner
 
@@ -291,17 +293,17 @@ def test_add_test_directory(runner):
     tests = list(dir_contents[0][2] + dir_contents[1][2])
     assert len(runner.tests) == 0
     # Need to use side effect to make isdir return True for test_dir and False for tests
     with patch('os.path.isdir', side_effect=[True] + [False for t in tests]) as isdir:
         with patch('os.walk', return_value=dir_contents) as walk:
             runner.add_test(test_dir)
     assert isdir.called and walk.called
     for test in runner.tests:
-        assert test_dir in test['filepath']
+        assert os.path.normpath(test_dir) in test['filepath']
     assert len(runner.tests) == 2
 
 
 @pytest.mark.parametrize("test_files_exist", [True, False])
 def test_add_test_manifest(mock_runner, manifest_with_tests, monkeypatch, test_files_exist):
     monkeypatch.setattr('marionette_harness.runner.base.TestManifest',
                         manifest_with_tests.manifest_class)
     mock_runner.marionette = mock_runner.driverclass()
--- a/testing/mozbase/manifestparser/tests/manifest.ini
+++ b/testing/mozbase/manifestparser/tests/manifest.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test_expressionparser.py]
 [test_manifestparser.py]
 [test_testmanifest.py]
 [test_read_ini.py]
 [test_convert_directory.py]
 [test_filters.py]
 [test_chunking.py]
--- a/testing/mozbase/mozcrash/tests/manifest.ini
+++ b/testing/mozbase/mozcrash/tests/manifest.ini
@@ -1,8 +1,8 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test_basic.py]
 [test_java_exception.py]
 [test_save_path.py]
 [test_stackwalk.py]
 [test_symbols_path.py]
--- a/testing/mozbase/mozdebug/tests/manifest.ini
+++ b/testing/mozbase/mozdebug/tests/manifest.ini
@@ -1,3 +1,3 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test.py]
--- a/testing/mozbase/mozdevice/tests/manifest.ini
+++ b/testing/mozbase/mozdevice/tests/manifest.ini
@@ -1,7 +1,7 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test_socket_connection.py]
 [test_is_app_installed.py]
 [test_chown.py]
 [test_escape_command_line.py]
--- a/testing/mozbase/mozfile/tests/manifest.ini
+++ b/testing/mozbase/mozfile/tests/manifest.ini
@@ -1,9 +1,9 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test_extract.py]
 [test_load.py]
 [test_move_remove.py]
 [test_tempdir.py]
 [test_tempfile.py]
 [test_tree.py]
 [test_url.py]
--- a/testing/mozbase/mozhttpd/tests/manifest.ini
+++ b/testing/mozbase/mozhttpd/tests/manifest.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [api.py]
 skip-if = python == 3
 [baseurl.py]
 [basic.py]
 [filelisting.py]
 skip-if = python == 3
 [paths.py]
 [requestlog.py]
--- a/testing/mozbase/mozinfo/tests/manifest.ini
+++ b/testing/mozbase/mozinfo/tests/manifest.ini
@@ -1,3 +1,3 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test.py]
--- a/testing/mozbase/mozinstall/tests/manifest.ini
+++ b/testing/mozbase/mozinstall/tests/manifest.ini
@@ -1,7 +1,7 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test_binary.py]
 [test_install.py]
 [test_is_installer.py]
 [test_uninstall.py]
--- a/testing/mozbase/mozlog/tests/manifest.ini
+++ b/testing/mozbase/mozlog/tests/manifest.ini
@@ -1,9 +1,9 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test_logger.py]
 skip-if = python == 3
 [test_logtypes.py]
 [test_formatters.py]
 skip-if = python == 3
 [test_structured.py]
 skip-if = python == 3
--- a/testing/mozbase/moznetwork/tests/manifest.ini
+++ b/testing/mozbase/moznetwork/tests/manifest.ini
@@ -1,4 +1,4 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test.py]
--- a/testing/mozbase/mozprocess/tests/manifest.ini
+++ b/testing/mozbase/mozprocess/tests/manifest.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test_detached.py]
 skip-if = os == "win"  # Bug 1493796
 [test_kill.py]
 [test_misc.py]
 [test_pid.py]
 [test_poll.py]
 [test_wait.py]
--- a/testing/mozbase/mozprofile/tests/manifest.ini
+++ b/testing/mozbase/mozprofile/tests/manifest.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test_addonid.py]
 [test_server_locations.py]
 [test_preferences.py]
 [test_permissions.py]
 [test_bug758250.py]
 [test_nonce.py]
 [test_clone_cleanup.py]
 [test_profile.py]
--- a/testing/mozbase/mozrunner/tests/manifest.ini
+++ b/testing/mozbase/mozrunner/tests/manifest.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 # We skip these tests in automated Windows builds because they trigger crashes
 # in sh.exe; see bug 1489277.
 skip-if = python == 3 || (automation && os == "win")
 [test_crash.py]
 [test_interactive.py]
 [test_start.py]
 [test_states.py]
 [test_stop.py]
--- a/testing/mozbase/mozsystemmonitor/tests/manifest.ini
+++ b/testing/mozbase/mozsystemmonitor/tests/manifest.ini
@@ -1,3 +1,3 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 [test_resource_monitor.py]
--- a/testing/mozbase/moztest/tests/manifest.ini
+++ b/testing/mozbase/moztest/tests/manifest.ini
@@ -1,5 +1,5 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 skip-if = python == 3
 [test.py]
 [test_resolve.py]
--- a/testing/mozbase/mozversion/tests/manifest.ini
+++ b/testing/mozbase/mozversion/tests/manifest.ini
@@ -1,6 +1,6 @@
 [DEFAULT]
-subsuite = mozbase, os == "linux"
+subsuite = mozbase
 
 [test_binary.py]
 [test_apk.py]
 skip-if = python == 3
--- a/tools/lint/test/python.ini
+++ b/tools/lint/test/python.ini
@@ -1,7 +1,7 @@
 [DEFAULT]
-subsuite=mozlint, os == "linux"
+subsuite = mozlint
 skip-if = python == 3
 
 [test_eslint.py]
 skip-if = os == "win"  # node not installed on worker
 [test_flake8.py]