def _windows_symlink(target, link): if os.path.isdir(target): args = ["mklink", "/D", link, target] else: args = ["mklink", link, target] try: subprocess.check_output(args, shell=True, stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: log.error(e.output) raise
def _check_step_run(step, run): if not step.checks: return True passed = 0 failed = 0 for check in step.checks: try: check.check_run(run) except run_check.Failed as e: log.error("check failed: %s", e) failed += 1 else: passed += 1 log.info("%i of %i checks passed", passed, passed + failed) if failed > 0: log.error("%i check(s) failed - see above for details", failed) return failed == 0