Title: [90428] trunk/Tools
- Revision
- 90428
- Author
- [email protected]
- Date
- 2011-07-05 19:32:14 -0700 (Tue, 05 Jul 2011)
Log Message
2011-07-05 Adam Barth <[email protected]>
garden-o-matic should understand which tests have unexpected failures
https://bugs.webkit.org/show_bug.cgi?id=63965
Reviewed by Eric Seidel.
Currently, this code just logs the list of unexpected failures to the
console. A future patch will do something useful with this
information. A testing harness will also come in the next patch.
* Scripts/webkitpy/tool/servers/data/gardeningserver/base.js: Added.
* Scripts/webkitpy/tool/servers/data/gardeningserver/index.html:
* Scripts/webkitpy/tool/servers/data/gardeningserver/results.js:
* Scripts/webkitpy/tool/servers/gardeningserver.py:
Modified Paths
Added Paths
Diff
Modified: trunk/Tools/ChangeLog (90427 => 90428)
--- trunk/Tools/ChangeLog 2011-07-06 02:30:50 UTC (rev 90427)
+++ trunk/Tools/ChangeLog 2011-07-06 02:32:14 UTC (rev 90428)
@@ -1,5 +1,21 @@
2011-07-05 Adam Barth <[email protected]>
+ garden-o-matic should understand which tests have unexpected failures
+ https://bugs.webkit.org/show_bug.cgi?id=63965
+
+ Reviewed by Eric Seidel.
+
+ Currently, this code just logs the list of unexpected failures to the
+ console. A future patch will do something useful with this
+ information. A testing harness will also come in the next patch.
+
+ * Scripts/webkitpy/tool/servers/data/gardeningserver/base.js: Added.
+ * Scripts/webkitpy/tool/servers/data/gardeningserver/index.html:
+ * Scripts/webkitpy/tool/servers/data/gardeningserver/results.js:
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+
+2011-07-05 Adam Barth <[email protected]>
+
garden-o-matic should know how to fetch test results from the (NRWT) bots
https://bugs.webkit.org/show_bug.cgi?id=63959
Added: trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/base.js (0 => 90428)
--- trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/base.js (rev 0)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/base.js 2011-07-06 02:32:14 UTC (rev 90428)
@@ -0,0 +1,27 @@
+var base = base || {};
+
+(function() {
+ base.joinPath = function(parent, child) {
+ return parent + '/' + child;
+ }
+
+ base.filterTree = function(tree, is_leaf, predicate) {
+ var filtered_tree = {};
+
+ function walkSubtree(subtree, directory) {
+ for (var child_name in subtree) {
+ var child = subtree[child_name];
+ var child_path = base.joinPath(directory, child_name);
+ if (is_leaf(child)) {
+ if (predicate(child))
+ filtered_tree[child_path] = child;
+ continue;
+ }
+ walkSubtree(child, child_path);
+ }
+ }
+
+ walkSubtree(tree, '');
+ return filtered_tree;
+ }
+})();
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/index.html (90427 => 90428)
--- trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/index.html 2011-07-06 02:30:50 UTC (rev 90427)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/index.html 2011-07-06 02:32:14 UTC (rev 90428)
@@ -34,6 +34,7 @@
<li><button class="quit">Quit</button></li>
</ul>
<script src=""
+<script src=""
<script src=""
<script src=""
</body>
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/results.js (90427 => 90428)
--- trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/results.js 2011-07-06 02:30:50 UTC (rev 90427)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/data/gardeningserver/results.js 2011-07-06 02:32:14 UTC (rev 90428)
@@ -3,7 +3,45 @@
var TEST_TYPE = 'layout-tests';
var RESULTS_NAME = 'full_results.json';
var MASTER_NAME = 'ChromiumWebkit';
+ var FAILING_RESULTS = ['TIMEOUT', 'TEXT', 'CRASH', 'IMAGE','IMAGE+TEXT'];
+ function isFailure(result) {
+ return FAILING_RESULTS.indexOf(result) != -1;
+ }
+
+ function anyIsFailure(results_list) {
+ return $.grep(results_list, isFailure).length > 0;
+ }
+
+ function addImpliedExpectations(results_list) {
+ if (results_list.indexOf('FAIL') == -1)
+ return results_list;
+ return results_list.concat(FAILING_RESULTS);
+ }
+
+ function unexpectedResults(result_node) {
+ var actual_results = result_node.actual.split(' ');
+ var expected_results = addImpliedExpectations(result_node.expected.split(' '))
+
+ return $.grep(actual_results, function(result) {
+ return expected_results.indexOf(result) == -1;
+ });
+ }
+
+ function isUnexpectedFailure(result_node) {
+ return anyIsFailure(unexpectedResults(result_node));
+ }
+
+ function isResultNode(node) {
+ return !!node.actual;
+ }
+
+ function logUnexpectedFailures(results_json) {
+ unexpected_failures = base.filterTree(results_json.tests, isResultNode, isUnexpectedFailure);
+ console.log('== Unexpected Failures ==')
+ console.log(unexpected_failures);
+ }
+
function resultsURL(builder_name, name) {
return TEST_RESULTS_SERVER + 'testfile' +
'?builder=' + builder_name +
@@ -20,8 +58,5 @@
});
}
- fetchResults('Webkit Linux', function(data) {
- console.log("== Results ==")
- console.log(data);
- });
+ fetchResults('Webkit Linux', logUnexpectedFailures);
})();
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py (90427 => 90428)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2011-07-06 02:30:50 UTC (rev 90427)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2011-07-06 02:32:14 UTC (rev 90428)
@@ -37,6 +37,7 @@
class GardeningHTTPRequestHandler(ReflectionHandler):
STATIC_FILE_NAMES = frozenset([
"index.html",
+ "base.js",
"main.js",
"results.js",
])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes