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

Unified Diff: tools/findit/utils.py

Issue 391173002: [Findit] Initiate Findit for crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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/findit/run_all_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/findit/utils.py
diff --git a/tools/findit/utils.py b/tools/findit/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e8a0ab947c28e74887dca6732af763f4f0eb59b
--- /dev/null
+++ b/tools/findit/utils.py
@@ -0,0 +1,24 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import re
+import sys
+
+
+GIT_HASH_PATTERN = re.compile(r'^[0-9a-fA-F]{40}$')
+
+
+def GetOSName(platform_name=sys.platform):
+ if platform_name == 'cygwin' or platform_name.startswith('win'):
+ return 'win'
+ elif platform_name.startswith('linux'):
+ return 'unix'
+ elif platform_name.startswith('darwin'):
+ return 'mac'
+ else:
+ return platform_name
+
+
+def IsGitHash(revision):
+ return GIT_HASH_PATTERN.match(str(revision))
« no previous file with comments | « tools/findit/run_all_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698