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

Unified Diff: chrome/test/kasko/py/kasko/report.py

Issue 2621363002: Remove Kasko! (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « chrome/test/kasko/py/kasko/process.py ('k') | chrome/test/kasko/py/kasko/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/kasko/py/kasko/report.py
diff --git a/chrome/test/kasko/py/kasko/report.py b/chrome/test/kasko/py/kasko/report.py
deleted file mode 100755
index 401d71c236e86e374de1d41007b64e76d2403b15..0000000000000000000000000000000000000000
--- a/chrome/test/kasko/py/kasko/report.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 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.
-
-"""Utility functions for dealing with crash reports."""
-
-import logging
-import os
-_LOGGER = logging.getLogger(os.path.basename(__file__))
-
-
-def LogCrashKeys(report):
- for key in sorted(report.keys()):
- val = report[key][0]
- if (len(val) < 64):
- _LOGGER.debug('Got crashkey "%s": "%s"', key, val)
- else:
- _LOGGER.debug('Got crashkey "%s": ...%d bytes...', key, len(val))
-
-
-def ValidateCrashReport(report, expectations=None):
- expected_keys = {}
-
- # The following keys are all expected to be set in all crashes, and should
- # be set by GetCrashKeysForKasko. The 'channel' crash-key doesn't need to be
- # set as it is omitted when empty (developer builds).
- get_crash_keys = 'GetCrashKeysForKasko'
- for k in ['guid', 'prod', 'plat', 'ver', 'ptype']:
- expected_keys[k] = get_crash_keys
-
- # The following crash keys are expected to be set by the Kasko code itself.
- kasko = 'Kasko'
- for k in ['kasko-generated-by-version', 'kasko-uploaded-by-version']:
- expected_keys[k] = kasko
-
- # Merge in additional expectations.
- if expectations:
- for key, value in expectations.iteritems():
- expected_keys[key] = value
-
- # Validate the expectations.
- missing_keys = False
- for expected_key, error in expected_keys.iteritems():
- if expected_key not in report:
- _LOGGER.error('Missing expected "%s" crash key.', expected_key)
- _LOGGER.error('"%s" integration appears broken.', error)
- missing_keys = True
-
- if missing_keys:
- raise Exception('Missing expected crash keys.')
« no previous file with comments | « chrome/test/kasko/py/kasko/process.py ('k') | chrome/test/kasko/py/kasko/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698