From: Mihai Bazon Date: Sun, 27 Oct 2013 08:02:44 +0000 (+0200) Subject: Display number of failed tests and corresponding files X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=582cc55cffc198f3401f90a0b32e2fcbe89afee1;p=UglifyJS.git Display number of failed tests and corresponding files --- diff --git a/test/run-tests.js b/test/run-tests.js index a3268dc3..f8e88d48 100755 --- a/test/run-tests.js +++ b/test/run-tests.js @@ -8,9 +8,14 @@ var sys = require("util"); var tests_dir = path.dirname(module.filename); var failures = 0; +var failed_files = {}; run_compress_tests(); -if (failures) process.exit(1); +if (failures) { + sys.error("\n!!! Failed " + failures + " test cases."); + sys.error("!!! " + Object.keys(failed_files).join(", ")); + process.exit(1); +} /* -----[ utils ]----- */ @@ -86,6 +91,7 @@ function run_compress_tests() { expected: expect }); failures++; + failed_files[file] = 1; } } var tests = parse_test(path.resolve(dir, file));