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 <rituka.patwal@postman.com>
This commit is contained in:
Rituka Patwal 2021-06-30 04:16:12 +05:30 committed by GitHub
parent d3c1f10e33
commit 3e69985b76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -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, {