Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,13 +755,18 @@ function runConsoleTests(defaultReporter, runInParallel) {
// schedule work for chunks
configFiles.forEach(function (f) {
var configPath = path.join(taskConfigsFolder, f);
var workerCmd = "mocha" + " -t " + testTimeout + " -R " + reporter + " " + colors + " " + run + " --config='" + configPath + "'";
var workerCmd = "mocha" + " -t " + testTimeout + " -R " + reporter + " " + colors + bail + " " + run + " --config='" + configPath + "'";
console.log(workerCmd);
exec(workerCmd, finishWorker, finishWorker)
});

function finishWorker(e, errorStatus) {
counter--;

if (bail && errorStatus !== undefined) {
failWithStatus(firstErrorStatus);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fail with the correct number of errors? I don't think firstErrorStatus would be assigned until after the next if block.

I guess the fix would be to move below the next if block or just return errorStatus

}

if (firstErrorStatus === undefined && errorStatus !== undefined) {
firstErrorStatus = errorStatus;
}
Expand Down Expand Up @@ -810,7 +815,7 @@ function runConsoleTests(defaultReporter, runInParallel) {
}

var testTimeout = 20000;
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true.");
desc("Runs all the tests in parallel using the built run.js file. Optional arguments are: t[ests]=category1|category2|... d[ebug]=true bail=false.");
task("runtests-parallel", ["build-rules", "tests", builtLocalDirectory], function() {
runConsoleTests('min', /*runInParallel*/ true);
}, {async: true});
Expand Down