Always run lint, even for runtests-parallel

The first runner runs lint, not the first to complete.
This commit is contained in:
Nathan Shively-Sanders 2016-03-09 12:40:53 -08:00
parent ac147b18a6
commit 8a01a973bb

View File

@ -652,7 +652,7 @@ function deleteTemporaryProjectOutput() {
}
}
function runConsoleTests(defaultReporter, defaultSubsets, postLint) {
function runConsoleTests(defaultReporter, defaultSubsets) {
cleanTestDirs();
var debug = process.env.debug || process.env.d;
tests = process.env.test || process.env.tests || process.env.t;
@ -685,13 +685,13 @@ function runConsoleTests(defaultReporter, defaultSubsets, postLint) {
subsetRegexes = subsets.map(function (sub) { return "^" + sub + ".*$"; });
subsetRegexes.push("^(?!" + subsets.join("|") + ").*$");
}
subsetRegexes.forEach(function (subsetRegex) {
subsetRegexes.forEach(function (subsetRegex, i) {
tests = subsetRegex ? ' -g "' + subsetRegex + '"' : '';
var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
console.log(cmd);
exec(cmd, function () {
deleteTemporaryProjectOutput();
if (postLint) {
if (i === 0) {
var lint = jake.Task['lint'];
lint.addListener('complete', function () {
complete();
@ -713,7 +713,7 @@ task("runtests-parallel", ["build-rules", "tests", builtLocalDirectory], functio
desc("Runs the tests using the built run.js file. Optional arguments are: t[ests]=regex r[eporter]=[list|spec|json|<more>] d[ebug]=true color[s]=false.");
task("runtests", ["build-rules", "tests", builtLocalDirectory], function() {
runConsoleTests('mocha-fivemat-progress-reporter', [], /*postLint*/ true);
runConsoleTests('mocha-fivemat-progress-reporter', []);
}, {async: true});
desc("Generates code coverage data via instanbul");