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

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/api.py

Issue 2270563005: Clean up some discrepancies in the perf recipe configs (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: You know, expectations and stuff. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 import contextlib 6 import contextlib
7 import copy 7 import copy
8 import itertools 8 import itertools
9 import json 9 import json
10 10
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 # TODO(phajdan.jr): Remove buildnumber when no longer used. 784 # TODO(phajdan.jr): Remove buildnumber when no longer used.
785 785
786 mastername = self.m.properties.get('mastername') 786 mastername = self.m.properties.get('mastername')
787 buildername = self.m.properties.get('buildername') 787 buildername = self.m.properties.get('buildername')
788 master_dict = self.builders.get(mastername, {}) 788 master_dict = self.builders.get(mastername, {})
789 bot_config = master_dict.get('builders', {}).get(buildername, {}) 789 bot_config = master_dict.get('builders', {}).get(buildername, {})
790 790
791 for name in ('buildername', 'slavename', 'buildnumber', 'mastername'): 791 for name in ('buildername', 'slavename', 'buildnumber', 'mastername'):
792 properties[name] = self.m.properties[name] 792 properties[name] = self.m.properties[name]
793 793
794 # Optional properties
795 for name in ('perf-id', 'results-url'):
796 if bot_config.get(name):
797 properties[name] = bot_config[name]
798
799 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM 794 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM
800 795
801 args.extend(['--properties', self.m.json.input(properties)]) 796 args.extend(['--properties', self.m.json.input(properties)])
802 797
803 return args 798 return args
804 799
805 def get_compile_targets_for_scripts(self): 800 def get_compile_targets_for_scripts(self):
806 return self.m.python( 801 return self.m.python(
807 name='get compile targets for scripts', 802 name='get compile targets for scripts',
808 script=self.m.path['checkout'].join( 803 script=self.m.path['checkout'].join(
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 targets in |compile_targets|.""" 1002 targets in |compile_targets|."""
1008 result = [] 1003 result = []
1009 for test in tests: 1004 for test in tests:
1010 test_compile_targets = test.compile_targets(api) 1005 test_compile_targets = test.compile_targets(api)
1011 # Always return tests that don't require compile. Otherwise we'd never 1006 # Always return tests that don't require compile. Otherwise we'd never
1012 # run them. 1007 # run them.
1013 if ((set(compile_targets) & set(test_compile_targets)) or 1008 if ((set(compile_targets) & set(test_compile_targets)) or
1014 not test_compile_targets): 1009 not test_compile_targets):
1015 result.append(test) 1010 result.append(test)
1016 return result 1011 return result
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698