From 3e69985b76af0f12717a157781cb9d1470837e34 Mon Sep 17 00:00:00 2001 From: Rituka Patwal Date: Wed, 30 Jun 2021 04:16:12 +0530 Subject: [PATCH] chore: set python interpreter to python3 in script/spec-runner.js (#29740) 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. 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 74f4a484a56a..68cf567953f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,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 51af5afdba2f..7775eb3b5460 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 67b087854876..d002d46abdd9 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 5989b83408b6..d88c0626d981 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: