diff --git a/taskcluster/ci/test/compiled.yml b/taskcluster/ci/test/compiled.yml index 4bd462932bb0..aa4e80374700 100644 --- a/taskcluster/ci/test/compiled.yml +++ b/taskcluster/ci/test/compiled.yml @@ -30,6 +30,7 @@ job-defaults: - unittests/mac_unittest.py windows.*: - unittests/win_unittest.py + python-3: true cppunit: description: "CPP Unit Tests" diff --git a/testing/mozharness/configs/raptor/windows_config.py b/testing/mozharness/configs/raptor/windows_config.py index 7b0e56f77bf3..4554e9919034 100644 --- a/testing/mozharness/configs/raptor/windows_config.py +++ b/testing/mozharness/configs/raptor/windows_config.py @@ -11,11 +11,15 @@ PYTHON = sys.executable PYTHON_DLL = "c:/mozilla-build/python27/python27.dll" VENV_PATH = os.path.join(os.getcwd(), "build/venv") +PYWIN32 = "pypiwin32==219" +if sys.version_info > (3, 0): + PYWIN32 = "pywin32==300" + config = { "log_name": "raptor", "installer_path": "installer.exe", "virtualenv_path": VENV_PATH, - "virtualenv_modules": ["pypiwin32==219", "raptor", "mozinstall"], + "virtualenv_modules": [PYWIN32, "raptor", "mozinstall"], "exes": { "python": PYTHON, "easy_install": [ diff --git a/testing/mozharness/configs/raptor/windows_vm_config.py b/testing/mozharness/configs/raptor/windows_vm_config.py index 0ab677a79405..b68697feed72 100644 --- a/testing/mozharness/configs/raptor/windows_vm_config.py +++ b/testing/mozharness/configs/raptor/windows_vm_config.py @@ -11,11 +11,15 @@ PYTHON = sys.executable PYTHON_DLL = "c:/mozilla-build/python27/python27.dll" VENV_PATH = os.path.join(os.getcwd(), "build/venv") +PYWIN32 = "pypiwin32==219" +if sys.version_info > (3, 0): + PYWIN32 = "pywin32==300" + config = { "log_name": "raptor", "installer_path": "installer.exe", "virtualenv_path": VENV_PATH, - "virtualenv_modules": ["pypiwin32==219", "raptor", "mozinstall"], + "virtualenv_modules": [PYWIN32, "raptor", "mozinstall"], "exes": { "python": PYTHON, "easy_install": [ diff --git a/testing/mozharness/configs/unittests/win_unittest.py b/testing/mozharness/configs/unittests/win_unittest.py index e5849c456c80..30e069913a8b 100644 --- a/testing/mozharness/configs/unittests/win_unittest.py +++ b/testing/mozharness/configs/unittests/win_unittest.py @@ -15,6 +15,10 @@ NODEJS_PATH = None if "MOZ_FETCHES_DIR" in os.environ: NODEJS_PATH = os.path.join(os.environ["MOZ_FETCHES_DIR"], "node/node.exe") +PYWIN32 = "pypiwin32==219" +if sys.version_info > (3, 0): + PYWIN32 = "pywin32==300" + XPCSHELL_NAME = "xpcshell.exe" EXE_SUFFIX = ".exe" DISABLE_SCREEN_SAVER = False @@ -39,7 +43,7 @@ config = { "installer_path": INSTALLER_PATH, "binary_path": BINARY_PATH, "xpcshell_name": XPCSHELL_NAME, - "virtualenv_modules": ["pypiwin32==219", "six==1.13.0", "vcversioner==2.16.0.0"], + "virtualenv_modules": [PYWIN32, "six==1.13.0", "vcversioner==2.16.0.0"], "virtualenv_path": "venv", "exe_suffix": EXE_SUFFIX, "run_file_names": { diff --git a/testing/remotecppunittests.py b/testing/remotecppunittests.py index c486112f89a6..03748aaf3531 100644 --- a/testing/remotecppunittests.py +++ b/testing/remotecppunittests.py @@ -64,7 +64,7 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests): ) apk_contents.extract(info, tmpdir) local_file = os.path.join(tmpdir, info.filename) - with open(local_file) as f: + with open(local_file, "rb") as f: # Decompress xz-compressed file. if f.read(5)[1:] == "7zXZ": cmd = ["xz", "-df", "--suffix", ".so", local_file]