| 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 from slave import recipe_test_api | 5 from recipe_engine import recipe_test_api |
| 6 | 6 |
| 7 # pylint: disable=W0232 | 7 # pylint: disable=W0232 |
| 8 class SyzygyTestApi(recipe_test_api.RecipeTestApi): | 8 class SyzygyTestApi(recipe_test_api.RecipeTestApi): |
| 9 @staticmethod | 9 @staticmethod |
| 10 def sanitize_non_alpha(text): | 10 def sanitize_non_alpha(text): |
| 11 """Sanitizes non-alphanumeric characters in a string, replacing with _.""" | 11 """Sanitizes non-alphanumeric characters in a string, replacing with _.""" |
| 12 return ''.join(c if c.isalnum() else '_' for c in text) | 12 return ''.join(c if c.isalnum() else '_' for c in text) |
| 13 | 13 |
| 14 @staticmethod | 14 @staticmethod |
| 15 def test_properties(): | 15 def test_properties(): |
| (...skipping 10 matching lines...) Expand all Loading... |
| 26 props['buildername'] = buildername | 26 props['buildername'] = buildername |
| 27 if slavename: | 27 if slavename: |
| 28 props['slavename'] = slavename | 28 props['slavename'] = slavename |
| 29 test = ( | 29 test = ( |
| 30 api.test('full_%s_%s' % (self.sanitize_non_alpha(mastername), | 30 api.test('full_%s_%s' % (self.sanitize_non_alpha(mastername), |
| 31 self.sanitize_non_alpha(buildername))) + | 31 self.sanitize_non_alpha(buildername))) + |
| 32 api.properties.generic(**props) + | 32 api.properties.generic(**props) + |
| 33 api.platform('win', 32) | 33 api.platform('win', 32) |
| 34 ) | 34 ) |
| 35 return test | 35 return test |
| OLD | NEW |