mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
function to create coreRenderProcessTestSuites
only when needed
This commit is contained in:
parent
8b382b9f62
commit
f4bdb22e7d
13
script/test
13
script/test
@ -102,6 +102,8 @@ function runCoreMainProcessTests (callback) {
|
||||
cp.on('close', exitCode => { callback(null, {exitCode, step: 'core-main-process', testCommand: `You can run the test again using: \n\t ${executablePath} ${testArguments.join(' ')}`}) })
|
||||
}
|
||||
|
||||
function getCoreRenderProcessTestSuites() {
|
||||
|
||||
// Build an array of functions, each running tests for a different rendering test
|
||||
const coreRenderProcessTestSuites = []
|
||||
const testPath = path.join(CONFIG.repositoryRootPath, 'spec')
|
||||
@ -121,6 +123,9 @@ for (let testFile of testFiles) {
|
||||
})
|
||||
}
|
||||
|
||||
return coreRenderProcessTestSuites
|
||||
}
|
||||
|
||||
// Build an array of functions, each running tests for a different bundled package
|
||||
const packageTestSuites = []
|
||||
for (let packageName in CONFIG.appMetadata.packageDependencies) {
|
||||
@ -219,7 +224,7 @@ function requestedTestSuites (platform) {
|
||||
let suites = []
|
||||
// Core tess
|
||||
if (coreAll) {
|
||||
suites.push(...[runCoreMainProcessTests, ...coreRenderProcessTestSuites])
|
||||
suites.push(...[runCoreMainProcessTests, ...getCoreRenderProcessTestSuites()])
|
||||
} else {
|
||||
|
||||
// Core main tests
|
||||
@ -229,14 +234,14 @@ function requestedTestSuites (platform) {
|
||||
|
||||
// Core renderer tests
|
||||
if (coreRenderer) {
|
||||
suites.push(...coreRenderProcessTestSuites)
|
||||
suites.push(...getCoreRenderProcessTestSuites())
|
||||
} else {
|
||||
// split
|
||||
if (coreRenderer1) {
|
||||
suites.push(...coreRenderProcessTestSuites.slice(0, CORE_RENDER_TO_TEST_IN_PARALLEL))
|
||||
suites.push(...getCoreRenderProcessTestSuites().slice(0, CORE_RENDER_TO_TEST_IN_PARALLEL))
|
||||
}
|
||||
if (coreRenderer2) {
|
||||
suites.push(...coreRenderProcessTestSuites.slice(CORE_RENDER_TO_TEST_IN_PARALLEL))
|
||||
suites.push(...getCoreRenderProcessTestSuites().slice(CORE_RENDER_TO_TEST_IN_PARALLEL))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user