(
new_configuration_dict, build_file, target_dict, configuration, visited
)
| 2384 | |
| 2385 | |
| 2386 | def MergeConfigWithInheritance( |
| 2387 | new_configuration_dict, build_file, target_dict, configuration, visited |
| 2388 | ): |
| 2389 | # Skip if previously visited. |
| 2390 | if configuration in visited: |
| 2391 | return |
| 2392 | |
| 2393 | # Look at this configuration. |
| 2394 | configuration_dict = target_dict["configurations"][configuration] |
| 2395 | |
| 2396 | # Merge in parents. |
| 2397 | for parent in configuration_dict.get("inherit_from", []): |
| 2398 | MergeConfigWithInheritance( |
| 2399 | new_configuration_dict, |
| 2400 | build_file, |
| 2401 | target_dict, |
| 2402 | parent, |
| 2403 | visited + [configuration], |
| 2404 | ) |
| 2405 | |
| 2406 | # Merge it into the new config. |
| 2407 | MergeDicts(new_configuration_dict, configuration_dict, build_file, build_file) |
| 2408 | |
| 2409 | # Drop abstract. |
| 2410 | if "abstract" in new_configuration_dict: |
| 2411 | del new_configuration_dict["abstract"] |
| 2412 | |
| 2413 | |
| 2414 | def SetUpConfigurations(target, target_dict): |
no test coverage detected