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

Unified Diff: tools/auto_bisect/run_tests

Issue 660393002: Refactoring the output of bisect script. Switching from plain printing to a combination of: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying recommendations Created 6 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/auto_bisect/bisect_perf_regression.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/run_tests
diff --git a/tools/auto_bisect/run_tests b/tools/auto_bisect/run_tests
index f078331514295205328558e3db09d8f7de7a8369..c6f9f355a0ba580dda7c633f4b24a78e454b9c02 100755
--- a/tools/auto_bisect/run_tests
+++ b/tools/auto_bisect/run_tests
@@ -8,11 +8,25 @@
import os
import sys
import unittest
+import logging
SRC = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)
def main():
+ if 'full-log' in sys.argv:
+ # Configure logging to show line numbers and logging level
+ fmt = '%(module)s:%(lineno)d - %(levelname)s: %(message)s'
+ logging.basicConfig(level=logging.DEBUG, stream=sys.stdout, format=fmt)
+ elif 'no-log' in sys.argv:
+ # Only WARN and above are shown, to standard error. (This is the logging
+ # module default config, hence we do nothing here)
+ pass
+ else:
+ # Behave as before. Make logging.info mimic print behavior
+ fmt = '%(message)s'
+ logging.basicConfig(level=logging.INFO, stream=sys.stdout, format=fmt)
+
# Running the tests depends on having the below modules in PYTHONPATH.
sys.path.append(os.path.join(SRC, 'tools', 'telemetry'))
sys.path.append(os.path.join(SRC, 'third_party', 'pymock'))
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698