INNER CODE UNIT · Python

run_tool

uxlfoundation/oneDAL · dev/release_tests/compare_release_trees.py:597

def run_tool(args):
    result = subprocess.run(
        args,
        check=False,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        text=True,
        errors="replace",
    )
    if result.returncode != 0:
        raise RuntimeError(result.stderr.strip() or result.stdout.strip())
    return result.stdout


def read_linux_exports(path):
    nm = shutil.which("nm")
    if nm:
        output = run_tool([nm, "-D", "--defined-only", str(path)])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…