(projects_yaml, target_project)
| 59 | logger.error('Wrong type', typeof(list_of_list)) |
| 60 | |
| 61 | def generate_mbedcli_files(projects_yaml, target_project): |
| 62 | with open(projects_yaml, 'r') as top_yaml: |
| 63 | try: |
| 64 | build_data = {} |
| 65 | topdict = yaml.load(top_yaml) |
| 66 | for dict_key in topdict: |
| 67 | if dict_key == 'projects': |
| 68 | for project in topdict[dict_key]: |
| 69 | if project == target_project: |
| 70 | parse_yaml_files(topdict[dict_key][project], build_data) |
| 71 | generate_custom_targets(project, build_data) |
| 72 | generate_custom_profile(build_data) |
| 73 | generate_mbedignore(build_data) |
| 74 | break |
| 75 | break |
| 76 | except yaml.YAMLError as ex: |
| 77 | logger.error("Found yaml parse error", ex) |
| 78 | |
| 79 | if __name__ == "__main__": |
| 80 | parser = argparse.ArgumentParser(description='projects.yaml file parser') |
no test coverage detected