Run benchmarks passes specDir

This commit is contained in:
Ben Ogle
2014-08-15 12:42:26 -07:00
parent 0a07e862c2
commit c989557b5e

View File

@@ -407,14 +407,17 @@ class AtomApplication
safeMode ?= false
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, logFile, safeMode})
runBenchmarks: ->
runBenchmarks: ({exitWhenDone, specDirectory}={}) ->
try
bootstrapScript = require.resolve(path.resolve(global.devResourcePath, 'benchmark', 'benchmark-bootstrap'))
catch error
bootstrapScript = require.resolve(path.resolve(__dirname, '..', '..', 'benchmark', 'benchmark-bootstrap'))
specDirectory ?= path.dirname(bootstrapScript)
isSpec = true
new AtomWindow({bootstrapScript, @resourcePath, isSpec})
devMode = true
new AtomWindow({bootstrapScript, @resourcePath, exitWhenDone, isSpec, specDirectory, devMode})
locationForPathToOpen: (pathToOpen) ->
return {pathToOpen} unless pathToOpen