Return a list of all build files included into build_file_path. The returned list will contain build_file_path as well as all other files that it included, either directly or indirectly. Note that the list may contain files that were included into a conditional section that evaluated
(build_file_path, aux_data, included=None)
| 137 | |
| 138 | |
| 139 | def GetIncludedBuildFiles(build_file_path, aux_data, included=None): |
| 140 | """Return a list of all build files included into build_file_path. |
| 141 | |
| 142 | The returned list will contain build_file_path as well as all other files |
| 143 | that it included, either directly or indirectly. Note that the list may |
| 144 | contain files that were included into a conditional section that evaluated |
| 145 | to false and was not merged into build_file_path's dict. |
| 146 | |
| 147 | aux_data is a dict containing a key for each build file or included build |
| 148 | file. Those keys provide access to dicts whose "included" keys contain |
| 149 | lists of all other files included by the build file. |
| 150 | |
| 151 | included should be left at its default None value by external callers. It |
| 152 | is used for recursion. |
| 153 | |
| 154 | The returned list will not contain any duplicate entries. Each build file |
| 155 | in the list will be relative to the current directory. |
| 156 | """ |
| 157 | |
| 158 | if included is None: |
| 159 | included = [] |
| 160 | |
| 161 | if build_file_path in included: |
| 162 | return included |
| 163 | |
| 164 | included.append(build_file_path) |
| 165 | |
| 166 | for included_build_file in aux_data[build_file_path].get("included", []): |
| 167 | GetIncludedBuildFiles(included_build_file, aux_data, included) |
| 168 | |
| 169 | return included |
| 170 | |
| 171 | |
| 172 | def CheckedEval(file_contents): |
no test coverage detected
searching dependent graphs…