Implement atom --benchmark-test to ensure benchmarks are valid on CI

This commit is contained in:
Antonio Scandurra
2016-10-13 17:09:54 +02:00
parent 42992032da
commit 1bdd79d719
9 changed files with 59 additions and 31 deletions

View File

@@ -45,7 +45,8 @@ module.exports = function parseCommandLine (processArgs) {
'portable',
'Set portable mode. Copies the ~/.atom folder to be a sibling of the installed Atom location if a .atom folder is not already there.'
)
options.boolean('benchmark').describe('benchmark', 'Run the specified benchmarks.')
options.boolean('benchmark').describe('benchmark', 'Open a new window that runs the specified benchmarks.')
options.boolean('benchmark-test').describe('benchmark--test', 'Run a faster version of the benchmarks in headless mode.')
options.alias('t', 'test').boolean('t').describe('t', 'Run the specified specs and exit with error code on failures.')
options.alias('m', 'main-process').boolean('m').describe('m', 'Run the specified specs in the main process.')
options.string('timeout').describe(
@@ -80,6 +81,7 @@ module.exports = function parseCommandLine (processArgs) {
const safeMode = args['safe']
const pathsToOpen = args._
const benchmark = args['benchmark']
const benchmarkTest = args['benchmark-test']
const test = args['test']
const mainProcess = args['main-process']
const timeout = args['timeout']
@@ -137,7 +139,7 @@ module.exports = function parseCommandLine (processArgs) {
resourcePath, devResourcePath, pathsToOpen, urlsToOpen, executedFrom, test,
version, pidToKillWhenClosed, devMode, safeMode, newWindow, logFile, socketPath,
userDataDir, profileStartup, timeout, setPortable, clearWindowState,
addToLastWindow, mainProcess, benchmark, env: process.env
addToLastWindow, mainProcess, benchmark, benchmarkTest, env: process.env
}
}