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

Unified Diff: build/android/pylib/utils/run_tests_helper.py

Issue 13820024: [Android] Thread names reflect the device serial number they are associated with. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove python2.7 specific features Created 7 years, 8 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 | « build/android/pylib/utils/reraiser_thread.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/run_tests_helper.py
diff --git a/build/android/pylib/utils/run_tests_helper.py b/build/android/pylib/utils/run_tests_helper.py
index b5730b6893aa544b2096772fc95180fd992b3d7a..32275970d90fac2a3e723f6cbe6753fe4ecd9524 100644
--- a/build/android/pylib/utils/run_tests_helper.py
+++ b/build/android/pylib/utils/run_tests_helper.py
@@ -13,7 +13,7 @@ class CustomFormatter(logging.Formatter):
"""Custom log formatter."""
#override
- def __init__(self, fmt=''):
+ def __init__(self, fmt='%(threadName)-4s %(message)s'):
# Can't use super() because in older Python versions logging.Formatter does
# not inherit from object.
logging.Formatter.__init__(self, fmt=fmt)
@@ -24,8 +24,10 @@ class CustomFormatter(logging.Formatter):
# Can't use super() because in older Python versions logging.Formatter does
# not inherit from object.
msg = logging.Formatter.format(self, record)
+ if 'MainThread' in msg[:19]:
+ msg = msg.replace('MainThread', 'Main', 1)
timediff = str(int(time.time() - self._creation_time))
- return '%s %ss %s' % (record.levelname[0], timediff.rjust(4), msg)
+ return '%s %ss %s' % (record.levelname[0], timediff.rjust(4), msg)
def GetExpectations(file_name):
« no previous file with comments | « build/android/pylib/utils/reraiser_thread.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698