From f916e31d768e46b1725215926a7c3bfc8e963000 Mon Sep 17 00:00:00 2001 From: Diullei Gomes Date: Sat, 23 Feb 2013 18:51:16 -0300 Subject: [PATCH] CI integration with travis-CI --- _tests/testRunner.js | 8 ++++---- _tests/testRunner.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/_tests/testRunner.js b/_tests/testRunner.js index a4d011251..1d13574ee 100644 --- a/_tests/testRunner.js +++ b/_tests/testRunner.js @@ -561,7 +561,7 @@ function runTests(testFiles) { } else { total_failure++; } - console.log(' [\033[35m' + lib + '\033[0m] ' + testFiles[testIndex].substr(cfg.root.length) + ' - ' + (testFile.errors.length == 0 ? '\033[32msuccess\033[0m' : '\033[31mfailure\033[0m')); + console.log(' [\033[36m' + lib + '\033[0m] ' + testFiles[testIndex].substr(cfg.root.length) + ' - ' + (testFile.errors.length == 0 ? '\033[32msuccess\033[0m' : '\033[31mfailure\033[0m')); var test = new Test(lib); test.files.push(testFile); tests.tests.push(test); @@ -585,12 +585,12 @@ function runTests(testFiles) { for(var attr in withoutTests) { var test = new Test(attr); tests.tests.push(test); - console.log(' [\033[35m' + attr + '\033[0m] without tests'); + console.log(' [\033[36m' + attr + '\033[0m] without tests'); withoutTestsCount++; } - console.log('\n> ' + (total_failure + total_success + withoutTestsCount) + ' tests. ' + '\033[32m' + total_success + ' tests success\033[0m, ' + '\033[31m' + total_failure + ' tests failed\033[0m and ' + '\033[35m' + withoutTestsCount + ' definitions without tests\033[0m.\n'); + console.log('\n> ' + (total_failure + total_success + withoutTestsCount) + ' tests. ' + '\033[32m' + total_success + ' tests success\033[0m, ' + '\033[31m' + total_failure + ' tests failed\033[0m and ' + withoutTestsCount + ' definitions without tests.\n'); if(total_failure > 0) { - process.exit(0); + process.exit(1); } } }); diff --git a/_tests/testRunner.ts b/_tests/testRunner.ts index 92215bc30..0472330a5 100644 --- a/_tests/testRunner.ts +++ b/_tests/testRunner.ts @@ -89,7 +89,7 @@ function runTests(testFiles) { total_failure++; } - console.log(' [\033[35m' + lib + '\033[0m] ' + testFiles[testIndex].substr(cfg.root.length) + console.log(' [\033[36m' + lib + '\033[0m] ' + testFiles[testIndex].substr(cfg.root.length) + ' - ' + (testFile.errors.length == 0 ? '\033[32msuccess\033[0m' : '\033[31mfailure\033[0m')); var test = new Test(lib); @@ -119,7 +119,7 @@ function runTests(testFiles) { var test = new Test(attr); tests.tests.push(test); - console.log(' [\033[35m' + attr + '\033[0m] without tests'); + console.log(' [\033[36m' + attr + '\033[0m] without tests'); withoutTestsCount++; } @@ -127,9 +127,11 @@ function runTests(testFiles) { + ' tests. ' + '\033[32m' + total_success + ' tests success\033[0m, ' + '\033[31m' + total_failure + ' tests failed\033[0m and ' - + '\033[35m' + withoutTestsCount + ' definitions without tests\033[0m.\n'); + + withoutTestsCount + ' definitions without tests.\n'); - if (total_failure > 0) process.exit(0); + if (total_failure > 0) { + process.exit(1); + } } }); }