зеркало из https://github.com/electron/electron.git
chore: steal all unknown args for use by the spec runners
This commit is contained in:
Родитель
be60f93bd0
Коммит
df57ac4ce7
|
@ -5,8 +5,11 @@ const crypto = require('crypto')
|
|||
const fs = require('fs')
|
||||
const { hashElement } = require('folder-hash')
|
||||
const path = require('path')
|
||||
const unknownArgs = []
|
||||
|
||||
const args = require('minimist')(process.argv, {
|
||||
string: ['only']
|
||||
string: ['only'],
|
||||
unknown: arg => unknownArgs.push(arg)
|
||||
})
|
||||
|
||||
const utils = require('./lib/utils')
|
||||
|
@ -98,7 +101,7 @@ async function runElectronTests () {
|
|||
|
||||
async function runRemoteBasedElectronTests () {
|
||||
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') {
|
||||
runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe)
|
||||
exe = 'python'
|
||||
|
@ -116,7 +119,7 @@ async function runRemoteBasedElectronTests () {
|
|||
async function runMainProcessElectronTests () {
|
||||
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, '../..'),
|
||||
stdio: 'inherit'
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче