1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#!/usr/bin/env python
# Actions available
# benchmarks
# - downloads benchmark results from android-qa-reports
# lava
# - downloads lava results from LAVA?
# bugs
# - downloads bug list from bugzilla based on keyword(s)
# cts
# - get list of CTS jobs
# - generate CTS rst summary?
# purge
from tools import (
download_benchmarks,
cts_job_ids,
result_report,
get_lcr_bugs
)
from argparse import ArgumentParser
if __name__ == '__main__':
parser = ArgumentParser()
parser.add_argument("-q",
"--quiet",
action="store_false",
dest="verbose",
default=True,
help="don't print status messages to stdout")
parser.add_argument("-b",
"--build-name",
dest="build_name",
help="Name of Jenkins project")
parser.add_argument("-n",
"--build-number",
dest="build_number",
help="Jenkins build number")
parser.add_argument("-u",
"--jenkins-url",
dest="jenkins_url",
default="https://ci.linaro.org/",
help="Jenkins master URL")
parser.add_argument("-a",
"--qa-reports-url",
dest="qareports_url",
default="https://android-qa-reports.linaro.org/api/",
help="QA reports REST API URL")
parser.add_argument("-o",
"--output",
dest="output",
default="results",
help="name of directory to store results (relative to PWD)")
parser.add_argument("-f",
"--force",
dest="force",
action="store_true",
default=False,
help="Force overwrite existing files")
subparsers = parser.add_subparsers(
help='sub-command help')
parser_b = subparsers.add_parser("benchmarks",
help="Download benchmark results from android-qa-reports")
parser_b.set_defaults(func=download_benchmarks)
parser_c = subparsers.add_parser("cts-jobs",
help="Download CTS job IDs android-qa-reports")
parser_c.set_defaults(func=cts_job_ids)
parser_i = subparsers.add_parser("index",
help="Creates report index.rst based on android-qa-reports")
parser_i.set_defaults(func=result_report)
parser_d = subparsers.add_parser("defects",
help="Creates bugs.rst")
parser_d.add_argument("-d"
"--device",
dest="device",
required=True,
help="Device for which bugs are retrieved. Possible: HiKey, Juno")
parser_d.set_defaults(func=get_lcr_bugs)
args = parser.parse_args()
args.func(args)
|