Kill the mutants that survived on the release's changed lines, and say 1 minute, not 1 minutes
CI / tests (pull_request) Successful in 4m10s
CI / tests (pull_request) Successful in 4m10s
This commit is contained in:
@@ -29,7 +29,7 @@ def ci_runner(log: pathlib.Path, seconds: float, say: Say, container: str, remov
|
||||
def run(worktree: pathlib.Path) -> CiRan | Failure:
|
||||
say(f"ci.sh's output goes to {log}; it is stopped where it still runs after {lasting(seconds)}")
|
||||
try:
|
||||
with log.open("w", encoding="utf-8") as output:
|
||||
with log.open("wb") as output:
|
||||
# In a session of its own, ci.sh and each process it starts share one process group, which `stopped` ends whole.
|
||||
process = subprocess.Popen(["sh", "ci.sh"], cwd=worktree, stdin=subprocess.DEVNULL, stdout=output, stderr=subprocess.STDOUT, start_new_session=True, env={**os.environ, CONTAINER: container})
|
||||
try:
|
||||
@@ -75,4 +75,5 @@ def removed_container(container: str, run: typing.Callable[..., subprocess.Compl
|
||||
|
||||
|
||||
def lasting(seconds: float) -> str:
|
||||
return f"{seconds / 60:g} minutes" if seconds >= 60 else f"{seconds:g} seconds"
|
||||
count, unit = (seconds / 60, "minute") if seconds >= 60 else (seconds, "second")
|
||||
return f"{count:g} {unit}{'' if count == 1 else 's'}"
|
||||
|
||||
Reference in New Issue
Block a user