Merge pull request #1999 from borisyankov/dev/bandaid/full

quick fix for runner; less cores, more speed
This commit is contained in:
Bart van der Schoor
2014-04-07 02:48:41 +02:00
3 changed files with 20 additions and 6 deletions

View File

@@ -1290,13 +1290,19 @@ var DT;
if (argv.help) {
optimist.showHelp();
var pkg = require('../../package.json');
console.log('Scripts:');
console.log('');
Lazy(pkg.scripts).keys().each(function (key) {
console.log(' $ npm run ' + key);
});
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),
concurrent: argv['single-thread'] ? 1 : Math.max(Math.min(24, cpuCores), 2),
tscVersion: argv['tsc-version'],
testChanges: testFull ? false : argv['test-changes'],
skipTests: argv['skip-tests'],
@@ -1312,7 +1318,4 @@ var DT;
process.exit(2);
});
})(DT || (DT = {}));
//grunt-start
/// <reference path="../runner.ts" />
//grunt-end
//# sourceMappingURL=runner.js.map

View File

@@ -34,6 +34,10 @@ module DT {
export var DEFAULT_TSC_VERSION = '0.9.7';
interface PackageJSON {
scripts: {[key:string]: string};
}
/////////////////////////////////
// Single test
/////////////////////////////////
@@ -333,13 +337,19 @@ module DT {
if (argv.help) {
optimist.showHelp();
var pkg: PackageJSON = require('../../package.json');
console.log('Scripts:');
console.log('');
Lazy(pkg.scripts).keys().each((key) => {
console.log(' $ npm run ' + key);
});
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),
concurrent: argv['single-thread'] ? 1 : Math.max(Math.min(24, cpuCores), 2),
tscVersion: argv['tsc-version'],
testChanges: testFull ? false : argv['test-changes'], // allow magic branch
skipTests: argv['skip-tests'],

View File

@@ -25,7 +25,8 @@
"all": "node ./_infrastructure/tests/runner.js --tsc-version 1.0.0",
"dry": "node ./_infrastructure/tests/runner.js --tsc-version 1.0.0 --skip-tests --test-changes",
"list": "node ./_infrastructure/tests/runner.js --tsc-version 1.0.0 --skip-tests --print-files --print-refmap",
"help": "node ./_infrastructure/tests/runner.js -h"
"help": "node ./_infrastructure/tests/runner.js -h",
"tsc_runner": "node ./_infrastructure/tests/typescript/1.0.0/tsc ./_infrastructure/tests/runner.ts --target ES5 --out ./_infrastructure/tests/runner.js --module commonjs --sourcemap"
},
"dependencies": {
"source-map-support": "~0.2.5",