forked from mirrors/gecko-dev
		
	 5af9079ea6
			
		
	
	
		5af9079ea6
		
	
	
	
	
		
			
			This means that a push to try affecting only Android will only run android builds and tests, for example. MozReview-Commit-ID: HVUvIg0EUZn --HG-- extra : rebase_source : 8b080b7648cea5f82cd03c9a7950667277b75118 extra : source : b41cd667697e13c989659b16bf649090a3908ecd
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			699 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			699 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # This Source Code Form is subject to the terms of the Mozilla Public
 | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this
 | |
| # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 | |
| 
 | |
| from __future__ import absolute_import, print_function, unicode_literals
 | |
| 
 | |
| import re
 | |
| 
 | |
| # platform family is extracted from build platform by taking the alphabetic prefix
 | |
| # and then translating win -> windows
 | |
| _platform_re = re.compile(r'^[a-z]*')
 | |
| _renames = {
 | |
|     'win': 'windows'
 | |
| }
 | |
| 
 | |
| 
 | |
| def platform_family(build_platform):
 | |
|     """Given a build platform, return the platform family (linux, macosx, etc.)"""
 | |
|     family = _platform_re.match(build_platform).group(0)
 | |
|     return _renames.get(family, family)
 |