runtests-parallel skips empty buckets

Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.

This was very obvious on machines with lots of cores.
This commit is contained in:
Nathan Shively-Sanders 2016-06-29 13:17:31 -07:00
parent 6be7d9caa6
commit c35e374ef4

View file

@ -193,7 +193,7 @@ if (taskConfigsFolder) {
for (let i = 0; i < workerCount; i++) {
const startPos = i * chunkSize;
const len = Math.min(chunkSize, files.length - startPos);
if (len !== 0) {
if (len > 0) {
workerConfigs[i].tasks.push({
runner: runner.kind(),
files: files.slice(startPos, startPos + len)
@ -214,5 +214,5 @@ else {
}
if (!runUnitTests) {
// patch `describe` to skip unit tests
describe = <any>describe.skip;
}
describe = <any>(function () { });
}