chore: steal all unknown args for use by the spec runners
This commit is contained in:
parent
be60f93bd0
commit
df57ac4ce7
1 changed files with 6 additions and 3 deletions
|
@ -5,8 +5,11 @@ const crypto = require('crypto')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const { hashElement } = require('folder-hash')
|
const { hashElement } = require('folder-hash')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const unknownArgs = []
|
||||||
|
|
||||||
const args = require('minimist')(process.argv, {
|
const args = require('minimist')(process.argv, {
|
||||||
string: ['only']
|
string: ['only'],
|
||||||
|
unknown: arg => unknownArgs.push(arg)
|
||||||
})
|
})
|
||||||
|
|
||||||
const utils = require('./lib/utils')
|
const utils = require('./lib/utils')
|
||||||
|
@ -98,7 +101,7 @@ async function runElectronTests () {
|
||||||
|
|
||||||
async function runRemoteBasedElectronTests () {
|
async function runRemoteBasedElectronTests () {
|
||||||
let exe = path.resolve(BASE, utils.getElectronExec())
|
let exe = path.resolve(BASE, utils.getElectronExec())
|
||||||
const runnerArgs = ['electron/spec', ...args._.slice(2)]
|
const runnerArgs = ['electron/spec', unknownArgs.slice(2)]
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe)
|
runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe)
|
||||||
exe = 'python'
|
exe = 'python'
|
||||||
|
@ -116,7 +119,7 @@ async function runRemoteBasedElectronTests () {
|
||||||
async function runMainProcessElectronTests () {
|
async function runMainProcessElectronTests () {
|
||||||
const exe = path.resolve(BASE, utils.getElectronExec())
|
const exe = path.resolve(BASE, utils.getElectronExec())
|
||||||
|
|
||||||
const { status } = childProcess.spawnSync(exe, ['electron/spec-main', ...args._.slice(2)], {
|
const { status } = childProcess.spawnSync(exe, ['electron/spec-main', ...unknownArgs.slice(2)], {
|
||||||
cwd: path.resolve(__dirname, '../..'),
|
cwd: path.resolve(__dirname, '../..'),
|
||||||
stdio: 'inherit'
|
stdio: 'inherit'
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue