| OLD | NEW |
| 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 # TODO(phajdan.jr): Remove buildnumber when no longer used. | 789 # TODO(phajdan.jr): Remove buildnumber when no longer used. |
| 790 | 790 |
| 791 mastername = self.m.properties.get('mastername') | 791 mastername = self.m.properties.get('mastername') |
| 792 buildername = self.m.properties.get('buildername') | 792 buildername = self.m.properties.get('buildername') |
| 793 master_dict = self.builders.get(mastername, {}) | 793 master_dict = self.builders.get(mastername, {}) |
| 794 bot_config = master_dict.get('builders', {}).get(buildername, {}) | 794 bot_config = master_dict.get('builders', {}).get(buildername, {}) |
| 795 | 795 |
| 796 for name in ('buildername', 'slavename', 'buildnumber', 'mastername'): | 796 for name in ('buildername', 'slavename', 'buildnumber', 'mastername'): |
| 797 properties[name] = self.m.properties[name] | 797 properties[name] = self.m.properties[name] |
| 798 | 798 |
| 799 # Optional properties | |
| 800 for name in ('perf-id', 'results-url'): | |
| 801 if bot_config.get(name): | |
| 802 properties[name] = bot_config[name] | |
| 803 | |
| 804 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM | 799 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM |
| 805 | 800 |
| 806 args.extend(['--properties', self.m.json.input(properties)]) | 801 args.extend(['--properties', self.m.json.input(properties)]) |
| 807 | 802 |
| 808 return args | 803 return args |
| 809 | 804 |
| 810 def get_compile_targets_for_scripts(self): | 805 def get_compile_targets_for_scripts(self): |
| 811 return self.m.python( | 806 return self.m.python( |
| 812 name='get compile targets for scripts', | 807 name='get compile targets for scripts', |
| 813 script=self.m.path['checkout'].join( | 808 script=self.m.path['checkout'].join( |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 targets in |compile_targets|.""" | 1007 targets in |compile_targets|.""" |
| 1013 result = [] | 1008 result = [] |
| 1014 for test in tests: | 1009 for test in tests: |
| 1015 test_compile_targets = test.compile_targets(api) | 1010 test_compile_targets = test.compile_targets(api) |
| 1016 # Always return tests that don't require compile. Otherwise we'd never | 1011 # Always return tests that don't require compile. Otherwise we'd never |
| 1017 # run them. | 1012 # run them. |
| 1018 if ((set(compile_targets) & set(test_compile_targets)) or | 1013 if ((set(compile_targets) & set(test_compile_targets)) or |
| 1019 not test_compile_targets): | 1014 not test_compile_targets): |
| 1020 result.append(test) | 1015 result.append(test) |
| 1021 return result | 1016 return result |
| OLD | NEW |