Bug 1683110 - run compiled tests as python 3 r=aki

run compiled tests w/python3

Differential Revision: https://phabricator.services.mozilla.com/D102619
This commit is contained in:
Joel Maher 2021-01-22 00:27:11 +00:00
Родитель ea28310de3
Коммит 87c5275284
5 изменённых файлов: 17 добавлений и 4 удалений

Просмотреть файл

@ -30,6 +30,7 @@ job-defaults:
- unittests/mac_unittest.py - unittests/mac_unittest.py
windows.*: windows.*:
- unittests/win_unittest.py - unittests/win_unittest.py
python-3: true
cppunit: cppunit:
description: "CPP Unit Tests" description: "CPP Unit Tests"

Просмотреть файл

@ -11,11 +11,15 @@ PYTHON = sys.executable
PYTHON_DLL = "c:/mozilla-build/python27/python27.dll" PYTHON_DLL = "c:/mozilla-build/python27/python27.dll"
VENV_PATH = os.path.join(os.getcwd(), "build/venv") VENV_PATH = os.path.join(os.getcwd(), "build/venv")
PYWIN32 = "pypiwin32==219"
if sys.version_info > (3, 0):
PYWIN32 = "pywin32==300"
config = { config = {
"log_name": "raptor", "log_name": "raptor",
"installer_path": "installer.exe", "installer_path": "installer.exe",
"virtualenv_path": VENV_PATH, "virtualenv_path": VENV_PATH,
"virtualenv_modules": ["pypiwin32==219", "raptor", "mozinstall"], "virtualenv_modules": [PYWIN32, "raptor", "mozinstall"],
"exes": { "exes": {
"python": PYTHON, "python": PYTHON,
"easy_install": [ "easy_install": [

Просмотреть файл

@ -11,11 +11,15 @@ PYTHON = sys.executable
PYTHON_DLL = "c:/mozilla-build/python27/python27.dll" PYTHON_DLL = "c:/mozilla-build/python27/python27.dll"
VENV_PATH = os.path.join(os.getcwd(), "build/venv") VENV_PATH = os.path.join(os.getcwd(), "build/venv")
PYWIN32 = "pypiwin32==219"
if sys.version_info > (3, 0):
PYWIN32 = "pywin32==300"
config = { config = {
"log_name": "raptor", "log_name": "raptor",
"installer_path": "installer.exe", "installer_path": "installer.exe",
"virtualenv_path": VENV_PATH, "virtualenv_path": VENV_PATH,
"virtualenv_modules": ["pypiwin32==219", "raptor", "mozinstall"], "virtualenv_modules": [PYWIN32, "raptor", "mozinstall"],
"exes": { "exes": {
"python": PYTHON, "python": PYTHON,
"easy_install": [ "easy_install": [

Просмотреть файл

@ -15,6 +15,10 @@ NODEJS_PATH = None
if "MOZ_FETCHES_DIR" in os.environ: if "MOZ_FETCHES_DIR" in os.environ:
NODEJS_PATH = os.path.join(os.environ["MOZ_FETCHES_DIR"], "node/node.exe") 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" XPCSHELL_NAME = "xpcshell.exe"
EXE_SUFFIX = ".exe" EXE_SUFFIX = ".exe"
DISABLE_SCREEN_SAVER = False DISABLE_SCREEN_SAVER = False
@ -39,7 +43,7 @@ config = {
"installer_path": INSTALLER_PATH, "installer_path": INSTALLER_PATH,
"binary_path": BINARY_PATH, "binary_path": BINARY_PATH,
"xpcshell_name": XPCSHELL_NAME, "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", "virtualenv_path": "venv",
"exe_suffix": EXE_SUFFIX, "exe_suffix": EXE_SUFFIX,
"run_file_names": { "run_file_names": {

Просмотреть файл

@ -64,7 +64,7 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
) )
apk_contents.extract(info, tmpdir) apk_contents.extract(info, tmpdir)
local_file = os.path.join(tmpdir, info.filename) 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. # Decompress xz-compressed file.
if f.read(5)[1:] == "7zXZ": if f.read(5)[1:] == "7zXZ":
cmd = ["xz", "-df", "--suffix", ".so", local_file] cmd = ["xz", "-df", "--suffix", ".so", local_file]