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

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

Issue 2400283003: [Findit] Add skeleton code for delta test script. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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
« no previous file with comments | « appengine/findit/util_scripts/crash_queries/delta_test/run-delta-test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 json
7 import logging
8 import os
9 import sys
10
11 _SCRIPT_DIR = os.path.join(os.path.dirname(__file__), os.path.pardir,
12 os.path.pardir)
13 sys.path.insert(1, _SCRIPT_DIR)
14
15 import script_util
16 script_util.SetUpSystemPaths()
17
18 from crash.findit_for_chromecrash import Culprit
19 from crash_queries.delta_test import delta_util
20
21
22 # TODO(katesonia): Replace the current testing function with real find culprit
23 # function.
24 def GetCulprits(crashes):
25 culprits = {}
26 for crash in crashes:
27 culprit = Culprit('proj', 'comp', [], ['rev1', 'rev2'])
28 culprits[crash['id']] = culprit
29
30 return culprits
31
32
33 def RunPredator():
34 """Runs delta testing between 2 different Findit versions."""
35 argparser = argparse.ArgumentParser(
36 description='Run azalea on a batch of crashes.')
37 argparser.add_argument('result_path', help='Path to store results')
38 argparser.add_argument(
39 '--verbose',
40 '-v',
41 action='store_true',
42 default=False,
43 help='Print findit results.')
44 argparser.add_argument(
45 '--client',
46 '-c',
47 default='fracas',
48 help=('Possible values are: fracas, cracas, clusterfuzz. Right now, only '
49 'fracas is supported.'))
50 args = argparser.parse_args()
51
52 crashes = json.loads(raw_input())
53 culprits = GetCulprits(crashes)
54
55 delta_util.FlushResult(culprits, args.result_path)
56
57
58 if __name__ == '__main__':
59 logging.basicConfig(level=logging.DEBUG)
60 RunPredator()
OLDNEW
« no previous file with comments | « appengine/findit/util_scripts/crash_queries/delta_test/run-delta-test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698