Skip to content

Commit 6ef384b

Browse files
committed
Add type to build_data.json
1 parent 8082799 commit 6ef384b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tools/build_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
658658
prep_report(report, toolchain.target.name, toolchain_name, id_name)
659659
cur_result = create_result(toolchain.target.name, toolchain_name,
660660
id_name, description)
661+
cur_result['type'] = 'library'
661662
if properties != None:
662663
prep_properties(properties, toolchain.target.name, toolchain_name,
663664
vendor_label)
@@ -1369,7 +1370,7 @@ def write_build_report(build_report, template_filename, filename):
13691370
passing_builds=build_report_passing))
13701371

13711372

1372-
def merge_build_data(filename, toolchain_report):
1373+
def merge_build_data(filename, toolchain_report, app_type):
13731374
path_to_file = dirname(abspath(filename))
13741375
try:
13751376
build_data = load(open(filename))
@@ -1384,5 +1385,7 @@ def merge_build_data(filename, toolchain_report):
13841385
build[0]['bin'] = relpath(build[0]['bin'], path_to_file)
13851386
except KeyError:
13861387
pass
1388+
if 'type' not in build[0]:
1389+
build[0]['type'] = app_type
13871390
build_data['builds'].append(build[0])
13881391
dump(build_data, open(filename, "wb"), indent=4, separators=(',', ': '))

tools/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,4 @@
352352

353353
sys.exit(1)
354354
if options.build_data:
355-
merge_build_data(options.build_data, build_data_blob)
355+
merge_build_data(options.build_data, build_data_blob, "application")

tools/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
248248
status = print_report_exporter.report(build_report)
249249
if options.build_data:
250-
merge_build_data(options.build_data, build_report)
250+
merge_build_data(options.build_data, build_report, "test")
251251

252252
if status:
253253
sys.exit(0)

0 commit comments

Comments
 (0)