Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1112)

Unified Diff: Tools/GardeningServer/model/test/ct-failures-tests.html

Issue 511253004: Use failure.tree field provided by the builder_alerts generator (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/model/ct-failures.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/test/ct-failures-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failures-tests.html b/Tools/GardeningServer/model/test/ct-failures-tests.html
index 0547ffc3de21c1ccc6d683ae8142cd3ae7a4a1d5..693874dc51f2a426541268ee485308c1e3e8ee22 100644
--- a/Tools/GardeningServer/model/test/ct-failures-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failures-tests.html
@@ -75,17 +75,21 @@ describe('ct-failures', function() {
{
reason: 'reason',
master_url: 'https://build.chromium.org/p/chromium.webkit',
+ tree: 'blink',
},
{
reason: 'reason:type',
master_url: 'https://build.chromium.org/p/chromium.chrome',
+ tree: 'chromium',
},
{
master_url: 'https://build.chromium.org/p/chromium.gpu',
+ tree: 'chromium',
},
{
reason: 'reason:type',
failureType: 'actual_type',
+ tree: undefined,
},
];
analyzer._mungeAlerts(alerts);
@@ -272,7 +276,7 @@ describe('ct-failures', function() {
builder_name: "Linux Tests (dbg)(1)",
key: "f1",
step_name: "compile",
- tree_name: null,
+ tree: 'chromium',
passing_revisions: {
v8: 50,
chromium: 99,
@@ -362,6 +366,38 @@ describe('ct-failures', function() {
});
});
+ describe('processFailuresForRangeGroup', function() {
+ it('should use tree name from json', function() {
+ var analyzer = new CTFailures(null);
+
+ var annotations = Promise.resolve({
+ 'test-key': 'test-annotation',
+ })
+ var range_groups = {
+ 'failure_keys': ['test-key'],
+ 'likely_revisions': []
+ }
+ var alertsByKey = {
+ 'test-key': {
+ 'key': 'test-key',
+ 'step_name': 'bot_update',
+ 'tree': 'test-tree',
+ 'builder_name': 'Linux',
+ 'last_failing_build': 1234,
+ 'failing_build': 1234,
+ 'master_url': 'http://build.chromium.org/p/chromium',
+ 'failing_build_count': 1,
+ 'reason': 'test-reason',
+ }
+ }
+ var newFailures = {}
+
+ analyzer._processFailuresForRangeGroup(newFailures, range_groups, alertsByKey, annotations)
+ assert.ok('test-tree' in newFailures)
+ assert.notOk('chromium' in newFailures)
+ });
+ });
+
});
})()
« no previous file with comments | « Tools/GardeningServer/model/ct-failures.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698