3
3
r"""
4
4
Use robot framework API to extract test result data from output.xml generated
5
5
by robot tests. For more information on the Robot Framework API, see
6
- http ://robot-framework.readthedocs.io/en/3.0 /autodoc/robot.result.html
6
+ https ://robot-framework.readthedocs.io/en/stable /autodoc/robot.result.html
7
7
"""
8
8
9
9
import csv
42
42
"%(prog)s uses a robot framework API to extract test result data"
43
43
" from output.xml generated by robot tests. For more information on"
44
44
" the Robot Framework API, see "
45
- " http ://robot-framework.readthedocs.io/en/3.0 /autodoc/robot.result.html"
45
+ " https ://robot-framework.readthedocs.io/en/stable /autodoc/robot.result.html"
46
46
),
47
47
formatter_class = argparse .ArgumentDefaultsHelpFormatter ,
48
48
prefix_chars = "-+" ,
52
52
"--source" ,
53
53
"-s" ,
54
54
help = (
55
- "The output.xml robot test result file path. This parameter is "
55
+ "The output.xml robot test result file path. This parameter is "
56
56
" required."
57
57
),
58
58
)
61
61
"--dest" ,
62
62
"-d" ,
63
63
help = (
64
- "The directory path where the generated .csv files will go. This "
65
- " parameter is required."
64
+ "The directory path where the generated .csv files will go. This"
65
+ " parameter is required."
66
66
),
67
67
)
68
68
69
69
parser .add_argument (
70
70
"--version_id" ,
71
71
help = (
72
- "Driver version of openbmc firmware which was used during test, "
72
+ "Driver version of openbmc firmware which was used during test,"
73
73
' e.g. "v2.1-215-g6e7eacb". This parameter is required.'
74
74
),
75
75
)
76
76
77
77
parser .add_argument (
78
78
"--platform" ,
79
79
help = (
80
- "OpenBMC platform which was used during test, e.g."
80
+ "OpenBMC platform which was used during test, e.g."
81
81
' "Witherspoon". This parameter is required.'
82
82
),
83
83
)
84
84
85
85
parser .add_argument (
86
86
"--level" ,
87
87
help = (
88
- "OpenBMC release level which was used during test, e.g."
88
+ "OpenBMC release level which was used during test, e.g."
89
89
' "Master", "OBMC920". This parameter is required.'
90
90
),
91
91
)
92
92
93
93
parser .add_argument (
94
94
"--test_phase" ,
95
95
help = (
96
- 'Name of testing phase, e.g. "DVT ", "SVT ", etc. This'
96
+ 'Name of testing phase, e.g. "CI ", "Regression ", etc. This'
97
97
" parameter is optional."
98
98
),
99
99
default = "FVT" ,
102
102
parser .add_argument (
103
103
"--subsystem" ,
104
104
help = (
105
- 'Name of the subsystem, e.g. "OPENBMC" etc. This parameter is'
105
+ 'Name of the subsystem, e.g. "OPENBMC" etc. This parameter is'
106
106
" optional."
107
107
),
108
108
default = "OPENBMC" ,
109
109
)
110
110
111
111
parser .add_argument (
112
112
"--processor" ,
113
- help = 'Name of processor, e.g. "P9 ". This parameter is optional.' ,
113
+ help = 'Name of processor, e.g. "XY ". This parameter is optional.' ,
114
114
default = "OPENPOWER" ,
115
115
)
116
116
119
119
stock_list = [("test_mode" , 0 ), ("quiet" , 0 ), ("debug" , 0 )]
120
120
121
121
122
- def exit_function (signal_number = 0 , frame = None ):
122
+ def exit_function (signal_number = 0 ):
123
123
r"""
124
124
Execute whenever the program ends normally or with the signals that we
125
125
catch (i.e. TERM, INT).
@@ -132,7 +132,7 @@ def exit_function(signal_number=0, frame=None):
132
132
qprint_pgm_footer ()
133
133
134
134
135
- def signal_handler (signal_number , frame ):
135
+ def signal_handler ():
136
136
r"""
137
137
Handle signals. Without a function to catch a SIGTERM or SIGINT, the
138
138
program would terminate immediately with return code 143 and without
@@ -191,6 +191,9 @@ def parse_output_xml(
191
191
platform Platform of the openbmc system.
192
192
level Release level of the OpenBMC system
193
193
(e.g. "Master").
194
+ test_phase Name of the test phase
195
+ e.g. "CI", "Regression", etc.
196
+ processor Name of processor, e.g. "XY".
194
197
"""
195
198
196
199
# Initialize tallies
@@ -384,7 +387,7 @@ def xml_to_csv_time(xml_datetime):
384
387
and return it.
385
388
386
389
Description of argument(s):
387
- datetime The date in the following format: %Y%m%d
390
+ xml_datetime The date in the following format: %Y%m%d
388
391
%H:%M:%S.%f (This is the format
389
392
typically found in an XML file.)
390
393
0 commit comments