From c94bdd679431ff38152a862777411bcd31e2d872 Mon Sep 17 00:00:00 2001 From: Masahiro Wakame Date: Thu, 21 Nov 2013 12:08:25 +0900 Subject: [PATCH 1/3] Fix success or failed determine code bug currently implementation was erroneous decision, e.g. _infrastructure/tests/typescript/tsc.js not exists. --- _infrastructure/tests/runner.js | 2 +- _infrastructure/tests/runner.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js index 5d025e234d..dd429bd208 100644 --- a/_infrastructure/tests/runner.js +++ b/_infrastructure/tests/runner.js @@ -691,7 +691,7 @@ var DefinitelyTyped; } Object.defineProperty(TestResult.prototype, "success", { get: function () { - return this.exitCode !== 1; + return this.exitCode === 0; }, enumerable: true, configurable: true diff --git a/_infrastructure/tests/runner.ts b/_infrastructure/tests/runner.ts index fb685ed44f..b0ad70a63a 100644 --- a/_infrastructure/tests/runner.ts +++ b/_infrastructure/tests/runner.ts @@ -139,7 +139,7 @@ module DefinitelyTyped.TestManager { exitCode:number; public get success():boolean { - return this.exitCode !== 1; + return this.exitCode === 0; } } From f5e0efcc8797b0fb1cfbda21702e215e32d07dd7 Mon Sep 17 00:00:00 2001 From: Masahiro Wakame Date: Thu, 21 Nov 2013 17:32:30 +0900 Subject: [PATCH 2/3] Fix latent bug it found by prev commit, avoid unexpected callback happen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit maxBuffer’s default is 200*1024 byte in Node.js require('child_process').exec but… $ node _infrastructure/tests/typescript/tsc.js --noImplicitAny threejs/three-tests.ts 2>&1 > /dev/null | wc 1963 21628 291809 over 200KB, when exec method called callback function, but it is not completed yet. exitCode === undefined. --- _infrastructure/tests/runner.js | 2 +- _infrastructure/tests/src/exec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js index dd429bd208..ba42dd21e3 100644 --- a/_infrastructure/tests/runner.js +++ b/_infrastructure/tests/runner.js @@ -59,7 +59,7 @@ var NodeExec = (function () { result.exitCode = null; var cmdLine = filename + ' ' + cmdLineArgs.join(' '); - var process = nodeExec(cmdLine, function (error, stdout, stderr) { + var process = nodeExec(cmdLine, { maxBuffer: 1 * 1024 * 1024 }, function (error, stdout, stderr) { result.stdout = stdout; result.stderr = stderr; result.exitCode = error ? error.code : 0; diff --git a/_infrastructure/tests/src/exec.ts b/_infrastructure/tests/src/exec.ts index f277d39425..5123d4cfc6 100644 --- a/_infrastructure/tests/src/exec.ts +++ b/_infrastructure/tests/src/exec.ts @@ -57,8 +57,8 @@ class NodeExec implements IExec { var result = new ExecResult(); result.exitCode = null; var cmdLine = filename + ' ' + cmdLineArgs.join(' '); - - var process = nodeExec(cmdLine, function (error, stdout, stderr) { + + var process = nodeExec(cmdLine, {maxBuffer: 1 * 1024 * 1024}, function (error, stdout, stderr) { result.stdout = stdout; result.stderr = stderr; result.exitCode = error ? error.code : 0; From 96c443c6473ea944cdb0def0d6a4c69ec0e50b3f Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 21 Nov 2013 19:59:20 +0900 Subject: [PATCH 3/3] Suppress test failed --- qunit/qunit.d.ts.tscparams | 1 + threejs/three-tests.ts.tscparams | 2 ++ ...core.string-tests.ts => underscore.string-tests.disabled.ts} | 0 3 files changed, 3 insertions(+) create mode 100644 threejs/three-tests.ts.tscparams rename underscore.string/{underscore.string-tests.ts => underscore.string-tests.disabled.ts} (100%) diff --git a/qunit/qunit.d.ts.tscparams b/qunit/qunit.d.ts.tscparams index e16c76dff8..3b6942a9de 100644 --- a/qunit/qunit.d.ts.tscparams +++ b/qunit/qunit.d.ts.tscparams @@ -1 +1,2 @@ "" + diff --git a/threejs/three-tests.ts.tscparams b/threejs/three-tests.ts.tscparams new file mode 100644 index 0000000000..3b6942a9de --- /dev/null +++ b/threejs/three-tests.ts.tscparams @@ -0,0 +1,2 @@ +"" + diff --git a/underscore.string/underscore.string-tests.ts b/underscore.string/underscore.string-tests.disabled.ts similarity index 100% rename from underscore.string/underscore.string-tests.ts rename to underscore.string/underscore.string-tests.disabled.ts