mirror of https://github.com/ARMmbed/mbed-os.git
Pass requires in mbed_app.json test
parent
dea8ea9f77
commit
243b079d2b
|
@ -543,7 +543,6 @@ class Config(object):
|
|||
# Check that we didn't already process this file
|
||||
if full_path in self.processed_configs:
|
||||
continue
|
||||
self.processed_configs[full_path] = True
|
||||
# Read the library configuration and add a "__full_config_path"
|
||||
# attribute to it
|
||||
try:
|
||||
|
@ -568,6 +567,13 @@ class Config(object):
|
|||
raise ConfigException("; ".join(
|
||||
self.format_validation_error(x, config_file)
|
||||
for x in errors))
|
||||
if (
|
||||
"requires" in self.app_config_data
|
||||
and cfg["name"] not in self.app_config_data["requires"]
|
||||
):
|
||||
continue
|
||||
|
||||
self.processed_configs[full_path] = True
|
||||
|
||||
cfg["__config_path"] = full_path
|
||||
|
||||
|
|
|
@ -6,6 +6,14 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requires_definition": {
|
||||
"descirption": "Required libraries",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "(^[\\w()_]+$|^[\\w()_]+=.+$)"
|
||||
}
|
||||
},
|
||||
"macro_definition": {
|
||||
"description": "A list of extra macros that will be defined when compiling a project that includes this library.",
|
||||
"type": "array",
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
"macros": {
|
||||
"$ref": "definitions.json#/macro_definition"
|
||||
},
|
||||
"requires": {
|
||||
"$ref": "definitions.json#/requires_definition"
|
||||
},
|
||||
"artifact_name": {
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
"target_overrides": {
|
||||
"$ref": "definitions.json#/target_overrides_definition"
|
||||
},
|
||||
"requires": {
|
||||
"$ref": "definitions.json#/requires_definition"
|
||||
},
|
||||
"macros": {
|
||||
"$ref": "definitions.json#/macro_definition"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue