INNER CODE UNIT · Python

expand_inputs

alper-han/CrossMacro · scripts/ci/verify-glibc-baseline.py:51

def expand_inputs(paths: list[Path]) -> list[Path]:
    expanded: list[Path] = []
    for path in paths:
        if path.is_dir():
            discovered = discover_elf_files([path])
            if not discovered:
                raise RuntimeError(f"directory contains no ELF files: {path}")
            expanded.extend(discovered)
        else:
            expanded.append(path)

    return sorted(set(expanded))


def inspect_binary(path: Path, readelf: str = "readelf") -> list[tuple[int, ...]]:
    if not path.is_file():
        raise RuntimeError(f"binary does not exist: {path}")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…