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