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

Unified Diff: tools/utils.py

Issue 8763: Change the test status file parser to fail if the line contains unparsed toke... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/utils.py
===================================================================
--- tools/utils.py (revision 671)
+++ tools/utils.py (working copy)
@@ -43,6 +43,20 @@
return list
+def GuessOS():
+ id = platform.system()
+ if id == 'Linux':
+ return 'linux'
+ elif id == 'Darwin':
+ return 'macos'
+ elif id == 'Windows' or id == 'Microsoft':
+ # On Windows Vista platform.system() can return 'Microsoft' with some
+ # versions of Python, see http://bugs.python.org/issue1082
+ return 'win32'
+ else:
+ return None
+
+
def GuessArchitecture():
id = platform.machine()
if id.startswith('arm'):
@@ -51,3 +65,14 @@
return 'ia32'
else:
return None
+
+
+def GuessWordsize():
+ if '64' in platform.machine():
+ return '64'
+ else:
+ return '32'
+
+
+def IsWindows():
+ return GuessOS() == 'win32'
« no previous file with comments | « tools/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698