|
55 | 55 | from tools.toolchains import mbedToolchain, TOOLCHAIN_CLASSES, TOOLCHAIN_PATHS
|
56 | 56 | from tools.settings import CLI_COLOR_MAP
|
57 | 57 |
|
58 |
| -def merge_metadata(filename, toolchain_report): |
| 58 | +def merge_build_data(filename, toolchain_report): |
59 | 59 | try:
|
60 |
| - metadata = load(open(filename)) |
| 60 | + build_data = load(open(filename)) |
61 | 61 | except (IOError, ValueError):
|
62 |
| - metadata = {'builds': []} |
| 62 | + build_data = {'builds': []} |
63 | 63 | for tgt in toolchain_report.values():
|
64 | 64 | for tc in tgt.values():
|
65 | 65 | for project in tc.values():
|
66 | 66 | for build in project:
|
67 |
| - metadata['builds'].append(build[0]) |
68 |
| - dump(metadata, open(filename, "wb"), indent=4, separators=(',', ': ')) |
| 67 | + build_data['builds'].append(build[0]) |
| 68 | + dump(build_data, open(filename, "wb"), indent=4, separators=(',', ': ')) |
69 | 69 |
|
70 | 70 | if __name__ == '__main__':
|
71 | 71 | # Parse Options
|
@@ -190,10 +190,10 @@ def merge_metadata(filename, toolchain_report):
|
190 | 190 | default=False,
|
191 | 191 | help="Link with mbed test library")
|
192 | 192 |
|
193 |
| - parser.add_argument("--metadata", |
194 |
| - dest="metadata", |
| 193 | + parser.add_argument("--build-data", |
| 194 | + dest="build_data", |
195 | 195 | default=None,
|
196 |
| - help="Dump metadata to this file") |
| 196 | + help="Dump build_data to this file") |
197 | 197 |
|
198 | 198 | # Specify a different linker script
|
199 | 199 | parser.add_argument("-l", "--linker", dest="linker_script",
|
@@ -267,7 +267,7 @@ def merge_metadata(filename, toolchain_report):
|
267 | 267 | %(toolchain,search_path))
|
268 | 268 |
|
269 | 269 | # Test
|
270 |
| - metadata_blob = {} if options.metadata else None |
| 270 | + build_data_blob = {} if options.build_data else None |
271 | 271 | for test_no in p:
|
272 | 272 | test = Test(test_no)
|
273 | 273 | if options.automated is not None: test.automated = options.automated
|
@@ -306,7 +306,7 @@ def merge_metadata(filename, toolchain_report):
|
306 | 306 | clean=options.clean,
|
307 | 307 | verbose=options.verbose,
|
308 | 308 | notify=notify,
|
309 |
| - report=metadata_blob, |
| 309 | + report=build_data_blob, |
310 | 310 | silent=options.silent,
|
311 | 311 | macros=options.macros,
|
312 | 312 | jobs=options.jobs,
|
@@ -362,5 +362,5 @@ def merge_metadata(filename, toolchain_report):
|
362 | 362 | print "[ERROR] %s" % str(e)
|
363 | 363 |
|
364 | 364 | sys.exit(1)
|
365 |
| - if options.metadata: |
366 |
| - merge_metadata(options.metadata, metadata_blob) |
| 365 | + if options.build_data: |
| 366 | + merge_build_data(options.build_data, build_data_blob) |
0 commit comments