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

Side by Side Diff: appengine/findit/util_scripts/crash_queries/delta_test/run-azalea.py

Issue 2400283003: [Findit] Add skeleton code for delta test script. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import argparse
6 import logging
7 import json
8
9 import dev_appserver
10 dev_appserver.fix_sys_path()
11
12 from crash.findit_for_chromecrash import Culprit
13 from crash_queries.delta_test import delta_util
14
15
16 # TODO(katesonia): Replace the current testing function with real find culprit
17 # function.
18 # Unused argument 'verbose' (unused-argument) - pylint: disable=W
19 def GetCulprits(crashes, verbose=False):
20 culprits = {}
21 for crash in crashes:
22 culprit = Culprit('proj', 'comp', [], ['rev1', 'rev2'])
23 culprits[crash['id']] = culprit
24
25 return culprits
26
27
28 def RunAzalea():
29 """Runs delta testing between 2 different Findit versions."""
30 argparser = argparse.ArgumentParser(
31 description='Run azalea on a batch of crashes.')
32 argparser.add_argument('result_path', help='Path to store results')
33 argparser.add_argument(
34 '--verbose',
35 '-v',
36 action='store_true',
37 default=False,
38 help='Print findit results.')
39
40 args = argparser.parse_args()
41
42 crashes = json.loads(raw_input())
43 culprits = GetCulprits(crashes, args.verbose)
44
45 delta_util.FlushResult(culprits, args.result_path)
46
47
48 if __name__ == '__main__':
49 logging.basicConfig(level=logging.DEBUG)
50 RunAzalea()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698