Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: tools/testrunner/local/utils.py

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/serialize.cc ('K') | « tools/testrunner/local/statusfile.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 # versions of Python, see http://bugs.python.org/issue1082 66 # versions of Python, see http://bugs.python.org/issue1082
67 return 'windows' 67 return 'windows'
68 elif system == 'FreeBSD': 68 elif system == 'FreeBSD':
69 return 'freebsd' 69 return 'freebsd'
70 elif system == 'OpenBSD': 70 elif system == 'OpenBSD':
71 return 'openbsd' 71 return 'openbsd'
72 elif system == 'SunOS': 72 elif system == 'SunOS':
73 return 'solaris' 73 return 'solaris'
74 elif system == 'NetBSD': 74 elif system == 'NetBSD':
75 return 'netbsd' 75 return 'netbsd'
76 elif system == 'AIX':
77 return 'aix'
76 else: 78 else:
77 return None 79 return None
78 80
79 81
80 def UseSimulator(arch): 82 def UseSimulator(arch):
81 machine = platform.machine() 83 machine = platform.machine()
82 return (machine and 84 return (machine and
83 (arch == "mipsel" or arch == "arm" or arch == "arm64") and 85 (arch == "mipsel" or arch == "arm" or arch == "arm64") and
84 not arch.startswith(machine)) 86 not arch.startswith(machine))
85 87
86 88
87 # This will default to building the 32 bit VM even on machines that are 89 # This will default to building the 32 bit VM even on machines that are
88 # capable of running the 64 bit VM. 90 # capable of running the 64 bit VM.
89 def DefaultArch(): 91 def DefaultArch():
90 machine = platform.machine() 92 machine = platform.machine()
91 machine = machine.lower() # Windows 7 capitalizes 'AMD64'. 93 machine = machine.lower() # Windows 7 capitalizes 'AMD64'.
92 if machine.startswith('arm'): 94 if machine.startswith('arm'):
93 return 'arm' 95 return 'arm'
94 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None): 96 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None):
95 return 'ia32' 97 return 'ia32'
96 elif machine == 'i86pc': 98 elif machine == 'i86pc':
97 return 'ia32' 99 return 'ia32'
98 elif machine == 'x86_64': 100 elif machine == 'x86_64':
99 return 'ia32' 101 return 'ia32'
100 elif machine == 'amd64': 102 elif machine == 'amd64':
101 return 'ia32' 103 return 'ia32'
102 elif id == 'ppc64': 104 elif machine == 'ppc64':
103 return 'ppc' 105 return 'ppc'
104 else: 106 else:
105 return None 107 return None
106 108
107 109
108 def GuessWordsize(): 110 def GuessWordsize():
109 if '64' in platform.machine(): 111 if '64' in platform.machine():
110 return '64' 112 return '64'
111 else: 113 else:
112 return '32' 114 return '32'
113 115
114 116
115 def IsWindows(): 117 def IsWindows():
116 return GuessOS() == 'windows' 118 return GuessOS() == 'windows'
117 119
118 120
119 def URLRetrieve(source, destination): 121 def URLRetrieve(source, destination):
120 """urllib is broken for SSL connections via a proxy therefore we 122 """urllib is broken for SSL connections via a proxy therefore we
121 can't use urllib.urlretrieve().""" 123 can't use urllib.urlretrieve()."""
122 with open(destination, 'w') as f: 124 with open(destination, 'w') as f:
123 f.write(urllib2.urlopen(source).read()) 125 f.write(urllib2.urlopen(source).read())
OLDNEW
« src/serialize.cc ('K') | « tools/testrunner/local/statusfile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698