Unverified Commit ab99b1fb authored by Jacek Galowicz's avatar Jacek Galowicz Committed by GitHub
Browse files

nixos/test-driver: fix race in parallelized OCR (#422370)

parents fa301642 5e2baf54
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -104,7 +104,9 @@ def _preprocess_screenshot(screenshot_path: Path, negate: bool = False) -> Path:

    if negate:
        magick_args.append("-negate")
        out_file = out_file.with_suffix(".negative")
        out_file = out_file.with_name(f"{out_file.stem}.negative.png")
    else:
        out_file = out_file.with_name(f"{out_file.stem}.positive.png")

    magick_args += [
        "-gamma",
@@ -112,7 +114,6 @@ def _preprocess_screenshot(screenshot_path: Path, negate: bool = False) -> Path:
        "-blur",
        "1x65535",
    ]
    out_file = out_file.with_suffix(".png")

    ret = subprocess.run(
        ["magick", "convert"] + magick_args + [screenshot_path, out_file],