| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 sys | 5 import sys |
| 6 import platform | 6 import platform |
| 7 | 7 |
| 8 from slave import recipe_api | 8 from recipe_engine import recipe_api |
| 9 | 9 |
| 10 | 10 |
| 11 def norm_plat(plat): | 11 def norm_plat(plat): |
| 12 if plat.startswith('linux'): | 12 if plat.startswith('linux'): |
| 13 return 'linux' | 13 return 'linux' |
| 14 elif plat.startswith(('win', 'cygwin')): | 14 elif plat.startswith(('win', 'cygwin')): |
| 15 return 'win' | 15 return 'win' |
| 16 elif plat.startswith(('darwin', 'mac')): | 16 elif plat.startswith(('darwin', 'mac')): |
| 17 return 'mac' | 17 return 'mac' |
| 18 else: # pragma: no cover | 18 else: # pragma: no cover |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return self._bits | 83 return self._bits |
| 84 | 84 |
| 85 @property | 85 @property |
| 86 def arch(self): | 86 def arch(self): |
| 87 return self._arch | 87 return self._arch |
| 88 | 88 |
| 89 @staticmethod | 89 @staticmethod |
| 90 def normalize_platform_name(platform): | 90 def normalize_platform_name(platform): |
| 91 """One of python's sys.platform values -> 'win', 'linux' or 'mac'.""" | 91 """One of python's sys.platform values -> 'win', 'linux' or 'mac'.""" |
| 92 return norm_plat(platform) # pragma: no cover | 92 return norm_plat(platform) # pragma: no cover |
| OLD | NEW |