Ensure build tests pass the correct exit code when their time limit is hit.

Former-commit-id: ead1bcc0448a639d5310ceb63e2efcf81e64a0c3
This commit is contained in:
John-David Dalton
2013-02-01 23:41:44 -08:00
parent 5ca903c428
commit aae6bbbb66
2 changed files with 4 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
language: node_js language: node_js
node_js: node_js:
- 0.6 - 0.6
- 0.8 - 0.9
git: git:
depth: 1 depth: 1
branches: branches:

View File

@@ -1214,7 +1214,9 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
if (isFinite(timeLimit)) { if (isFinite(timeLimit)) {
setTimeout(process.exit, timeLimit * 6e4); setTimeout(function() {
process.exit(QUnit.config.stats.bad ? 1 : 0);
}, timeLimit * 6e4);
} }
// explicitly call `QUnit.start()` for Narwhal, Node.js, Rhino, and RingoJS // explicitly call `QUnit.start()` for Narwhal, Node.js, Rhino, and RingoJS
if (!global.document) { if (!global.document) {