diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 01:15:44 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 01:15:44 +0000 |
commit | 4e96f295b07947c65f291828eb72f38655e8f619 (patch) | |
tree | 7248c72eb1d48aa70ab8ddb5095fe75810764402 | |
parent | 0f960456d6cf88e7427ef2728e67141a064f58c6 (diff) | |
download | chromium_src-4e96f295b07947c65f291828eb72f38655e8f619.zip chromium_src-4e96f295b07947c65f291828eb72f38655e8f619.tar.gz chromium_src-4e96f295b07947c65f291828eb72f38655e8f619.tar.bz2 |
Make the paths in the layout test dashboard point to the actual JSON
files now that they're available on the bots.
Also a couple bug fixes:
-Don't remove whitespace from the expectations JSON since there
is legitimate whitespace in the values.
-Fix bug in generated HTML for the links in the header.
Review URL: http://codereview.chromium.org/173096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23789 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/tools/layout_tests/flakiness_dashboard.html | 47 | ||||
-rwxr-xr-x | webkit/tools/layout_tests/run_webkit_tests.py | 5 |
2 files changed, 38 insertions, 14 deletions
diff --git a/webkit/tools/layout_tests/flakiness_dashboard.html b/webkit/tools/layout_tests/flakiness_dashboard.html index f73fe0e..6199ad9 100644 --- a/webkit/tools/layout_tests/flakiness_dashboard.html +++ b/webkit/tools/layout_tests/flakiness_dashboard.html @@ -98,6 +98,7 @@ .current-builder { text-decoration: none; color: black; + font-weight: bold; } </style> @@ -118,7 +119,27 @@ * -copy them to the appropriate location * -add the builder name to the list of builders below. */ - var builders = ['WebKit', 'WebKitDebug']; + + // Default to layout_tests. + var testType = window.location.search.substring(1) || 'layout_test_results'; + + // Map of builderName (the name shown in the waterfall) + // to builderPath (the path used in the builder's URL) + // TODO(ojan): Make this switch based off of the testType. + var builders = { + 'Webkit': 'webkit-rel', + 'Webkit (dbg)(1)': 'webkit-dbg-1', + 'Webkit (dbg)(2)': 'webkit-dbg-2', + 'Webkit (dbg)(3)': 'webkit-dbg-3', + 'Webkit Linux': 'webkit-rel-linux', + 'Webkit Linux (dbg)(1)': 'webkit-dbg-linux-1', + 'Webkit Linux (dbg)(2)': 'webkit-dbg-linux-2', + 'Webkit Linux (dbg)(3)': 'webkit-dbg-linux-3', + 'Webkit Mac10.5': 'webkit-rel-mac5', + 'Webkit Mac10.5 (dbg)(1)': 'webkit-dbg-mac5-1', + 'Webkit Mac10.5 (dbg)(2)': 'webkit-dbg-mac5-2', + 'Webkit Mac10.5 (dbg)(3)': 'webkit-dbg-mac5-3' + }; /* TODO PYTHON @@ -140,25 +161,29 @@ */ var resultsByBuilder = {}; var expectationsByTest = {}; - var testType = window.location.search.substring(1); function ADD_RESULTS(builds) { - for (var builderName in builds) - resultsByBuilder[builderName] = builds[builderName]; + for (var builderName in builds) { + // TODO(ojan): Remove this if statement once all the bots have been + // clobbered. For now, skip this dummy builder that got added to the + // results JSON. + if (builderName != "WebKitBuilder") + resultsByBuilder[builderName] = builds[builderName]; + } } - var BUILDER_BASE = 'LayoutTestDashBoard'; + var BUILDER_BASE = 'http://build.chromium.org/buildbot/'; function getPathToBuilderResultsFile(builderName) { // TODO(ojan): Make this match the actual path to the bots. - return BUILDER_BASE + testType + builders[i] + return BUILDER_BASE + testType + '/' + builders[builderName] + '/'; } - for (var i = 0; i < builders.length; i++) { + for (var builderName in builders) { var script = document.createElement('script'); - script.src = getPathToBuilderResultsFile(builders[i]) + 'results.js'; + script.src = getPathToBuilderResultsFile(builderName) + 'results.json'; document.getElementsByTagName('head')[0].appendChild(script); } var script = document.createElement('script'); // Grab expectations file from any builder. - script.src = getPathToBuilderResultsFile(builders[0]) + 'expectations.json'; + script.src = getPathToBuilderResultsFile(builderName) + 'expectations.json'; document.getElementsByTagName('head')[0].appendChild(script); function ADD_EXPECTATIONS(expectations) { @@ -475,9 +500,9 @@ var html = '<div class=header-container>'; html += '<span class=builders>'; - for (var builder in resultsByBuilder) { + for (var builder in builders) { var className = builder == currentState.builder ? 'current-builder' : ''; - html += '<a' + (className ? ' class="' + className : '') + '" link"' + + html += '<a href="#" class="' + (className || '') + '" link"' + ' onclick=\'setState("builder", "' + builder + '");return false;\'>' + builder + '</a>'; } diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py index 4938871..807467e 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.py +++ b/webkit/tools/layout_tests/run_webkit_tests.py @@ -601,9 +601,8 @@ class TestRunner: # TODO(ojan): Generate JSON using a JSON library instead of relying on # GetExpectationsForAllPlatforms returning an object that only uses # primitive types. - # Strip whitespace to reduce filesize. - expectations_json = re.sub(r'\s+', '', - repr(self._expectations.GetExpectationsForAllPlatforms())) + expectations_json = repr( + self._expectations.GetExpectationsForAllPlatforms()) expectations_file.write(("ADD_EXPECTATIONS(" + expectations_json + ");")) expectations_file.close() |