def METHOD_NAME(exercise, workdir, quiet: bool = False) -> int:
    kwargs = {}
    if quiet:
        kwargs['stdout'] = subprocess.DEVNULL
        kwargs['stderr'] = subprocess.DEVNULL
    if TEST_RUNNER_DIR.is_dir():
        kwargs['cwd'] = str(TEST_RUNNER_DIR)
        args = ['./bin/run.sh', exercise.slug, workdir, workdir]
    else:
        args = [
            'docker-compose',
            'run',
            '-w', str(TEST_RUNNER_DIR),
            '--entrypoint', './bin/run.sh',
            '-v', f'{workdir}:/{exercise.slug}',
            'test-runner',
            exercise.slug,
            f'/{exercise.slug}',
            f'/{exercise.slug}',
        ]
    subprocess.run(args, **kwargs)
    results_file = workdir / 'results.json'
    if results_file.is_file():
        with results_file.open() as f:
            results = json.load(f)
        if results['status'] == 'pass':
            return 0
    return 1