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

Unified Diff: build/android/tombstones.py

Issue 2664873002: Add logdog_helper script. (Closed)
Patch Set: Update one use of AddLink to SetLink I missed Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/test_runner.pydeps ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/tombstones.py
diff --git a/build/android/tombstones.py b/build/android/tombstones.py
index f2b5904ae5d15b1654ad53d8f863257b34c92235..9838accbf487b7188c36e474d84ea6a496cf2e77 100755
--- a/build/android/tombstones.py
+++ b/build/android/tombstones.py
@@ -26,10 +26,6 @@ from devil.android import device_utils
from devil.utils import run_tests_helper
from pylib import constants
-sys.path.insert(0, os.path.abspath(os.path.join(
- constants.DIR_SOURCE_ROOT, 'tools', 'swarming_client')))
-from libs.logdog import bootstrap # pylint: disable=import-error
-
_TZ_UTC = {'TZ': 'UTC'}
@@ -258,32 +254,6 @@ def ResolveTombstones(device, resolve_all_tombstones, include_stack_symbols,
wipe_tombstones))
-def LogdogTombstones(resolved_tombstones, stream_name):
- """Save resolved tombstones to logdog and return the url.
-
- Args:
- stream_name: The name of the logdog stream that records tombstones.
- resolved_tombstones: Resolved tombstones (output of ResolveTombstones).
-
- Returns:
- A url link to the recorded tombstones.
- """
- try:
- tombstones_url = ''
- stream_client = bootstrap.ButlerBootstrap.probe().stream_client()
- with stream_client.text(stream_name) as logdog_stream:
- for tombstones_line in resolved_tombstones:
- logdog_stream.write(tombstones_line + '\n')
- tombstones_url = logdog_stream.get_viewer_url(stream_name)
- except bootstrap.NotBootstrappedError:
- logging.exception('Error not bootstrapped. Failed to start logdog')
- except (KeyError, ValueError) as e:
- logging.exception('Error when creating stream_client/stream: %s.', e)
- except Exception as e: # pylint: disable=broad-except
- logging.exception('Unknown Error: %s.', e)
- return tombstones_url
-
-
def main():
custom_handler = logging.StreamHandler(sys.stdout)
custom_handler.setFormatter(run_tests_helper.CustomFormatter())
« no previous file with comments | « build/android/test_runner.pydeps ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698