From 81a5ae8f6e314dde772b28d8b58c2f1416b163c8 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Mon, 2 Mar 2015 15:48:18 -0800 Subject: [PATCH] fix(build): report and fail on errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tree benchmark was broken and we didn’t know it… also changes reporting to not include messages from `console.time()`, … --- gulpfile.js | 2 +- modules/angular2/src/test_lib/e2e_util.es6 | 4 +++- modules/benchmarks/src/tree/tree_benchmark.js | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 157ac1e687..97066e0e1e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,7 +43,7 @@ var _HTLM_DEFAULT_SCRIPTS_JS = [ {src: '../../extension-register.js', mimeType: 'text/javascript'}, {src: '../../runtime_paths.js', mimeType: 'text/javascript'}, { - inline: 'System.import(\'$MODULENAME$\').then(function(m) { m.main(); }, console.log.bind(console))', + inline: 'System.import(\'$MODULENAME$\').then(function(m) { m.main(); }, console.error.bind(console))', mimeType: 'text/javascript' } ]; diff --git a/modules/angular2/src/test_lib/e2e_util.es6 b/modules/angular2/src/test_lib/e2e_util.es6 index ee463e0129..ab86047cff 100644 --- a/modules/angular2/src/test_lib/e2e_util.es6 +++ b/modules/angular2/src/test_lib/e2e_util.es6 @@ -17,7 +17,9 @@ function verifyNoBrowserErrors() { browser.executeScript('1+1'); browser.manage().logs().get('browser').then(function(browserLog) { var filteredLog = browserLog.filter(function(logEntry) { - console.log('>> ' + require('util').inspect(logEntry)); + if (logEntry.level.value >= webdriver.logging.Level.INFO.value) { + console.log('>> ' + logEntry.message); + } return logEntry.level.value > webdriver.logging.Level.WARNING.value; }); expect(filteredLog.length).toEqual(0); diff --git a/modules/benchmarks/src/tree/tree_benchmark.js b/modules/benchmarks/src/tree/tree_benchmark.js index 2602d24691..8dc8afd4f9 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.js +++ b/modules/benchmarks/src/tree/tree_benchmark.js @@ -189,12 +189,20 @@ function setupReflector() { }); } +var BASELINE_TREE_TEMPLATE; +var BASELINE_IF_TEMPLATE; + export function main() { BrowserDomAdapter.makeCurrent(); var maxDepth = getIntParameter('depth'); setupReflector(); + BASELINE_TREE_TEMPLATE = DOM.createTemplate( + '_'); + BASELINE_IF_TEMPLATE = DOM.createTemplate( + ''); + var app; var lifeCycle; var baselineRootTreeComponent; @@ -306,10 +314,6 @@ function buildTree(maxDepth, values, curDepth) { buildTree(maxDepth, values, curDepth+1)); } -var BASELINE_TREE_TEMPLATE = DOM.createTemplate( - '_'); -var BASELINE_IF_TEMPLATE = DOM.createTemplate( - ''); // http://jsperf.com/nextsibling-vs-childnodes class BaseLineTreeComponent {