INNER CODE UNIT · Python

StageError

wasm3/wasm3 · extra/check.py:40

class StageError(Exception):
    """A stage failed. A message is optional: a command that failed has already said so."""


def run(cmd, cwd=ROOT):
    """Run a command, its output going straight to ours rather than being captured.

    The suites report progress as they go and print a summary that is worth reading in
    full; buffering it to re-print on failure would hide a run that is merely slow.
    """
    print(f"\n{ansi.BOLD}${ansi.ENDC} {shlex.join(cmd)}", flush=True)
    if subprocess.call(cmd, cwd=cwd) != 0:
        raise StageError()


def built(args, name):
    """Locate an executable the build stage produced.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…