Skip to content

Commit

Permalink
chore: set python interpreter to python3 in script/spec-runner.js (#2…
Browse files Browse the repository at this point in the history
…9944)

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 <rituka.patwal@postman.com>
  • Loading branch information
trop[bot] and Rituka Patwal committed Jul 1, 2021
1 parent a5a8b92 commit 9957887
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions script/spec-runner.js
Expand Up @@ -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, {
Expand Down Expand Up @@ -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, {
Expand Down
2 changes: 1 addition & 1 deletion 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:
Expand Down
2 changes: 1 addition & 1 deletion 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:
Expand Down

0 comments on commit 9957887

Please sign in to comment.