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 |
799 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM | 804 properties['target_platform'] = self.m.chromium.c.TARGET_PLATFORM |
800 | 805 |
801 args.extend(['--properties', self.m.json.input(properties)]) | 806 args.extend(['--properties', self.m.json.input(properties)]) |
802 | 807 |
803 return args | 808 return args |
804 | 809 |
805 def get_compile_targets_for_scripts(self): | 810 def get_compile_targets_for_scripts(self): |
806 return self.m.python( | 811 return self.m.python( |
807 name='get compile targets for scripts', | 812 name='get compile targets for scripts', |
808 script=self.m.path['checkout'].join( | 813 script=self.m.path['checkout'].join( |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 targets in |compile_targets|.""" | 1012 targets in |compile_targets|.""" |
1008 result = [] | 1013 result = [] |
1009 for test in tests: | 1014 for test in tests: |
1010 test_compile_targets = test.compile_targets(api) | 1015 test_compile_targets = test.compile_targets(api) |
1011 # Always return tests that don't require compile. Otherwise we'd never | 1016 # Always return tests that don't require compile. Otherwise we'd never |
1012 # run them. | 1017 # run them. |
1013 if ((set(compile_targets) & set(test_compile_targets)) or | 1018 if ((set(compile_targets) & set(test_compile_targets)) or |
1014 not test_compile_targets): | 1019 not test_compile_targets): |
1015 result.append(test) | 1020 result.append(test) |
1016 return result | 1021 return result |
OLD | NEW |