File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,8 @@ class BenchmarkDriver(object):
136
136
137
137
@property
138
138
def _cmd_list_benchmarks (self ):
139
- return [self .test_harness , "--list" , "--json" ] + (
139
+ # TODO: Switch to JSON format: add "--json" here
140
+ return [self .test_harness , "--list" ] + (
140
141
["--skip-tags=" ] if (self .args .benchmarks or self .args .filters ) else []
141
142
)
142
143
@@ -145,8 +146,19 @@ class BenchmarkDriver(object):
145
146
lines = self ._invoke (self ._cmd_list_benchmarks ).split ("\n " )
146
147
json_tests = []
147
148
for line in lines :
148
- if line .strip () != "" :
149
- json_tests .append (json .loads (line ))
149
+ columns = re .split (r'[ ,]+' , line .strip ())
150
+ try :
151
+ number = int (columns [0 ])
152
+ name = columns [1 ]
153
+ json = {"number" : number , "name" : name }
154
+ json_tests .append (json )
155
+ except Exception as e :
156
+ continue
157
+ # TODO: Replace the above with the following to
158
+ # use the JSON output from the benchmark driver
159
+ # directly
160
+ #if line.strip() != "":
161
+ # json_tests.append(json.loads(line))
150
162
self .all_tests = [json ["name" ] for json in json_tests ]
151
163
test_numbers = [json ["number" ] for json in json_tests ]
152
164
self .test_number = dict ([(json ["name" ], json ["number" ]) for json in json_tests ])
You can’t perform that action at this time.
0 commit comments