mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Adding option to skip main process tests. Cleaning up resources in tests.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
"legal-eagle": "0.14.0",
|
||||
"lodash.template": "4.4.0",
|
||||
"minidump": "0.9.0",
|
||||
"minimist": "^1.2.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"normalize-package-data": "2.3.5",
|
||||
"npm": "5.3.0",
|
||||
|
||||
18
script/test
18
script/test
@@ -3,6 +3,7 @@
|
||||
'use strict'
|
||||
|
||||
require('colors')
|
||||
const argv = require('minimist')(process.argv.slice(2))
|
||||
const assert = require('assert')
|
||||
const async = require('async')
|
||||
const childProcess = require('child_process')
|
||||
@@ -150,17 +151,26 @@ function runBenchmarkTests (callback) {
|
||||
let testSuitesToRun = testSuitesForPlatform(process.platform)
|
||||
|
||||
function testSuitesForPlatform (platform) {
|
||||
let suites = [];
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
return [runCoreMainProcessTests, runCoreRenderProcessTests, runBenchmarkTests].concat(packageTestSuites)
|
||||
suites = [runCoreMainProcessTests, runCoreRenderProcessTests, runBenchmarkTests].concat(packageTestSuites)
|
||||
break
|
||||
case 'win32':
|
||||
return (process.arch === 'x64') ? [runCoreMainProcessTests, runCoreRenderProcessTests] : [runCoreMainProcessTests]
|
||||
suites = (process.arch === 'x64') ? [runCoreMainProcessTests, runCoreRenderProcessTests] : [runCoreMainProcessTests]
|
||||
break
|
||||
case 'linux':
|
||||
return [runCoreMainProcessTests]
|
||||
suites = [runCoreMainProcessTests]
|
||||
break
|
||||
default:
|
||||
console.log(`Unrecognized platform: ${platform}`)
|
||||
return []
|
||||
}
|
||||
|
||||
if(argv.skipMainProccessTests) {
|
||||
suites = suites.filter(suite => suite !== runCoreMainProcessTests);
|
||||
}
|
||||
|
||||
return suites;
|
||||
}
|
||||
|
||||
async.series(testSuitesToRun, function (err, exitCodes) {
|
||||
|
||||
Reference in New Issue
Block a user