From 995788741204e842c4d7593f46cab30809c530ee Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 17:27:30 -0400 Subject: [PATCH] chore: set python interpreter to python3 in script/spec-runner.js (#29944) The new installs of the python module, python-dbusmock, is broken for python2. The tests still run fine on linux machine in Electron's pipeline setup on CircleCI, because the docker image used has the non-broken version of python-dbusmock for python2 installed. But running electron tests on any other linux machine would fail if they don't have this non-broken version of python-dbusmock for python2 installed, already, which is the case for most of the machines. Moreover, Python2 is deprecated now. So it would be better if we change the python interpreter in script/spec-runner.js file to python3, for which all the python modules are updated and working. Notes: none Co-authored-by: Rituka Patwal --- .circleci/config.yml | 2 +- script/spec-runner.js | 4 ++-- vsts-arm32v7.yml | 2 +- vsts-arm64v8.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f16cab9f494ba..a49a7870abdfa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -67,7 +67,7 @@ executors: type: enum enum: ["medium", "xlarge", "2xlarge+"] docker: - - image: electron.azurecr.io/build:6555a80939fb4c3ddf9343b3f140e573f40de225 + - image: electron.azurecr.io/build:4fc81b50f9c0980699d329bc32062fac20a26701 resource_class: << parameters.size >> macos: diff --git a/script/spec-runner.js b/script/spec-runner.js index 51af5afdba2f1..7775eb3b5460f 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -128,7 +128,7 @@ async function runRemoteBasedElectronTests () { const runnerArgs = ['electron/spec', ...unknownArgs.slice(2)]; if (process.platform === 'linux') { runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe); - exe = 'python'; + exe = 'python3'; } const { status } = childProcess.spawnSync(exe, runnerArgs, { @@ -199,7 +199,7 @@ async function runMainProcessElectronTests () { const runnerArgs = ['electron/spec-main', ...unknownArgs.slice(2)]; if (process.platform === 'linux') { runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe); - exe = 'python'; + exe = 'python3'; } const { status, signal } = childProcess.spawnSync(exe, runnerArgs, { diff --git a/vsts-arm32v7.yml b/vsts-arm32v7.yml index 67b0878548768..d002d46abdd9d 100644 --- a/vsts-arm32v7.yml +++ b/vsts-arm32v7.yml @@ -1,7 +1,7 @@ resources: containers: - container: arm32v7-test-container - image: electron.azurecr.io/build:arm32v7-6555a80939fb4c3ddf9343b3f140e573f40de225 + image: electron.azurecr.io/build:arm32v7-4fc81b50f9c0980699d329bc32062fac20a26701 options: --shm-size 128m jobs: diff --git a/vsts-arm64v8.yml b/vsts-arm64v8.yml index 5989b83408b63..d88c0626d9810 100644 --- a/vsts-arm64v8.yml +++ b/vsts-arm64v8.yml @@ -1,7 +1,7 @@ resources: containers: - container: arm64v8-test-container - image: electron.azurecr.io/build:arm64v8-6555a80939fb4c3ddf9343b3f140e573f40de225 + image: electron.azurecr.io/arm64v8-4fc81b50f9c0980699d329bc32062fac20a26701 options: --shm-size 128m jobs: