diff --git a/_infrastructure/tests/compile-runner.bat b/_infrastructure/tests/compile-runner.bat index e54803ec8..49f737c5d 100644 --- a/_infrastructure/tests/compile-runner.bat +++ b/_infrastructure/tests/compile-runner.bat @@ -1 +1 @@ -tsc runner.ts --target ES5 --out runner.js --module commonjs \ No newline at end of file +tsc runner.ts --target ES5 --out runner.js --module commonjs --sourcemap diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js index 649569923..9a3647abd 100644 --- a/_infrastructure/tests/runner.js +++ b/_infrastructure/tests/runner.js @@ -850,7 +850,7 @@ var DT; var Promise = require('bluebird'); - var endDts = /\w\.ts$/i; + var endDts = /\w\.d\.ts$/i; ///////////////////////////////// // .d.ts syntax inspection @@ -1035,9 +1035,6 @@ var DT; // add a closure to queue this.queue.push(function () { - // when activate, add test to active list - _this.active.push(test); - // run it var p = test.run(); p.then(defer.resolve.bind(defer), defer.reject.bind(defer)); @@ -1048,6 +1045,9 @@ var DT; } _this.step(); }); + + // return it + return test; }); this.step(); @@ -1056,13 +1056,9 @@ var DT; }; TestQueue.prototype.step = function () { - var _this = this; - // setTimeout to make it flush - setTimeout(function () { - while (_this.queue.length > 0 && _this.active.length < _this.concurrent) { - _this.queue.pop().call(null); - } - }, 1); + while (this.queue.length > 0 && this.active.length < this.concurrent) { + this.active.push(this.queue.pop().call(null)); + } }; return TestQueue; })(); @@ -1297,10 +1293,12 @@ var DT; process.exit(0); } + var testFull = process.env['TRAVIS_BRANCH'] ? /\w\/full$/.test(process.env['TRAVIS_BRANCH']) : false; + new TestRunner(dtPath, { concurrent: argv['single-thread'] ? 1 : Math.max(cpuCores, 2), tscVersion: argv['tsc-version'], - testChanges: argv['test-changes'], + testChanges: testFull ? false : argv['test-changes'], skipTests: argv['skip-tests'], printFiles: argv['print-files'], printRefMap: argv['print-refmap'], @@ -1314,4 +1312,7 @@ var DT; process.exit(2); }); })(DT || (DT = {})); +//grunt-start +/// +//grunt-end //# sourceMappingURL=runner.js.map diff --git a/_infrastructure/tests/runner.ts b/_infrastructure/tests/runner.ts index 6e71d621a..5d4f42815 100644 --- a/_infrastructure/tests/runner.ts +++ b/_infrastructure/tests/runner.ts @@ -75,8 +75,6 @@ module DT { var defer = Promise.defer(); // add a closure to queue this.queue.push(() => { - // when activate, add test to active list - this.active.push(test); // run it var p = test.run(); p.then(defer.resolve.bind(defer), defer.reject.bind(defer)); @@ -87,6 +85,8 @@ module DT { } this.step(); }); + // return it + return test; }); this.step(); // defer it @@ -94,12 +94,9 @@ module DT { } private step(): void { - // setTimeout to make it flush - setTimeout(() => { - while (this.queue.length > 0 && this.active.length < this.concurrent) { - this.queue.pop().call(null); - } - }, 1); + while (this.queue.length > 0 && this.active.length < this.concurrent) { + this.active.push(this.queue.pop().call(null)); + } } } @@ -339,10 +336,12 @@ module DT { process.exit(0); } + var testFull = process.env['TRAVIS_BRANCH'] ? /\w\/full$/.test(process.env['TRAVIS_BRANCH']) : false; + new TestRunner(dtPath, { concurrent: argv['single-thread'] ? 1 : Math.max(cpuCores, 2), tscVersion: argv['tsc-version'], - testChanges: argv['test-changes'], + testChanges: testFull ? false : argv['test-changes'], // allow magic branch skipTests: argv['skip-tests'], printFiles: argv['print-files'], printRefMap: argv['print-refmap'], diff --git a/_infrastructure/tests/src/suite/syntax.ts b/_infrastructure/tests/src/suite/syntax.ts index 9211c3fde..915fd18d0 100644 --- a/_infrastructure/tests/src/suite/syntax.ts +++ b/_infrastructure/tests/src/suite/syntax.ts @@ -6,7 +6,7 @@ module DT { var Promise: typeof Promise = require('bluebird'); - var endDts = /\w\.ts$/i; + var endDts = /\w\.d\.ts$/i; ///////////////////////////////// // .d.ts syntax inspection