File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 53
53
SUPPORTED_IDES = [exp for exp in list (EXPORTERS ) + list (EXPORTER_ALIASES )
54
54
if exp != "cmsis" and exp != "zip" ]
55
55
56
+ def get_table_from_pretty_table (pretty_table ):
57
+ rows = []
58
+ for pretty_row in pretty_table :
59
+ row = {}
60
+ for key in pretty_table .field_names :
61
+ pretty_row .border = False
62
+ pretty_row .header = False
63
+ row [key ] = pretty_row .get_string (fields = [key ]).strip ()
64
+ rows .append (row )
65
+ return rows
56
66
57
67
def get_build_summary (results ):
58
68
"""Prints to screen the complication results of example programs.
@@ -80,6 +90,10 @@ def get_build_summary(results):
80
90
print ("\n \n Failed Example Compilation:" )
81
91
print (fail_table )
82
92
print ("Number of failures = %d" % failure_counter )
93
+ # output build information to json file
94
+ rows = get_table_from_pretty_table (pass_table ) + get_table_from_pretty_table (fail_table )
95
+ with open ("build_data.json" , "w" ) as write_file :
96
+ json .dump (rows , write_file , indent = 4 , sort_keys = True )
83
97
return failure_counter
84
98
85
99
def get_export_summary (results ):
You can’t perform that action at this time.
0 commit comments