From aae6bbbb66862ac98664776e6c43a97e40ce50b1 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Feb 2013 23:41:44 -0800 Subject: [PATCH] Ensure build tests pass the correct exit code when their time limit is hit. Former-commit-id: ead1bcc0448a639d5310ceb63e2efcf81e64a0c3 --- .travis.yml | 2 +- test/test-build.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 667213d2e..b8aed37d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - 0.6 - - 0.8 + - 0.9 git: depth: 1 branches: diff --git a/test/test-build.js b/test/test-build.js index c8927b951..fe666ec17 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -1214,7 +1214,9 @@ /*--------------------------------------------------------------------------*/ 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 if (!global.document) {