| 189 | __ln2 = re.compile("/(tools|libs)/(.*)$") |
| 190 | __ln3 = re.compile("(/status$)") |
| 191 | def get_library_name(path): |
| 192 | |
| 193 | path = path.replace("\\", "/") |
| 194 | match1 = __ln1.match(path) |
| 195 | match2 = __ln2.match(path) |
| 196 | match3 = __ln3.match(path) |
| 197 | |
| 198 | if match1: |
| 199 | return match1.group(2) |
| 200 | elif match2: |
| 201 | return match2.group(2) |
| 202 | elif match3: |
| 203 | return "" |
| 204 | elif option.get("dump-tests", False, True): |
| 205 | # The 'run' rule and others might be used outside boost. In that case, |
| 206 | # just return the path, since the 'library name' makes no sense. |
| 207 | return path |
| 208 | |
| 209 | # Was an XML dump requested? |
| 210 | __out_xml = option.get("out-xml", False, True) |