Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpkgs-ci[bot] authored Jan 19, 2025
2 parents 62ee7d8 + 5159ce0 commit 90a1f88
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 33 deletions.
5 changes: 2 additions & 3 deletions ci/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/by-name/au/auto-patchelf @layus
/pkgs/pkgs-lib @infinisil

## Format generators/serializers
/pkgs/pkgs-lib/formats/libconfig @h7x4
/pkgs/pkgs-lib/formats/hocon @h7x4
/pkgs/pkgs-lib @Stunkymonkey @h7x4

# Nixpkgs build-support
/pkgs/build-support/writers @lassulus @Profpatsch
Expand Down
34 changes: 18 additions & 16 deletions nixos/lib/test-driver/src/test_driver/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,16 @@ def _perform_ocr_on_screenshot(

tess_args = "-c debug_file=/dev/null --psm 11"

cmd = f"convert {magick_args} '{screenshot_path}' 'tiff:{screenshot_path}.tiff'"
cmd = f"magick convert {magick_args} '{screenshot_path}' '{screenshot_path}.png'"
ret = subprocess.run(cmd, shell=True, capture_output=True)
if ret.returncode != 0:
raise Exception(f"TIFF conversion failed with exit code {ret.returncode}")
raise Exception(
f"Image processing failed with exit code {ret.returncode}, stdout: {ret.stdout.decode()}, stderr: {ret.stderr.decode()}"
)

model_results = []
for model_id in model_ids:
cmd = f"tesseract '{screenshot_path}.tiff' - {tess_args} --oem '{model_id}'"
cmd = f"tesseract '{screenshot_path}.png' - {tess_args} --oem '{model_id}'"
ret = subprocess.run(cmd, shell=True, capture_output=True)
if ret.returncode != 0:
raise Exception(f"OCR failed with exit code {ret.returncode}")
Expand Down Expand Up @@ -352,7 +354,7 @@ def wait_for_unit(
timing out.
"""

def check_active(_: Any) -> bool:
def check_active(_last_try: bool) -> bool:
state = self.get_unit_property(unit, "ActiveState", user)
if state == "failed":
raise Exception(f'unit "{unit}" reached state "{state}"')
Expand Down Expand Up @@ -637,7 +639,7 @@ def wait_until_succeeds(self, command: str, timeout: int = 900) -> str:
"""
output = ""

def check_success(_: Any) -> bool:
def check_success(_last_try: bool) -> bool:
nonlocal output
status, output = self.execute(command, timeout=timeout)
return status == 0
Expand All @@ -652,7 +654,7 @@ def wait_until_fails(self, command: str, timeout: int = 900) -> str:
"""
output = ""

def check_failure(_: Any) -> bool:
def check_failure(_last_try: bool) -> bool:
nonlocal output
status, output = self.execute(command, timeout=timeout)
return status != 0
Expand Down Expand Up @@ -712,9 +714,9 @@ def wait_until_tty_matches(self, tty: str, regexp: str, timeout: int = 900) -> N
"""
matcher = re.compile(regexp)

def tty_matches(last: bool) -> bool:
def tty_matches(last_try: bool) -> bool:
text = self.get_tty_text(tty)
if last:
if last_try:
self.log(
f"Last chance to match /{regexp}/ on TTY{tty}, "
f"which currently contains: {text}"
Expand All @@ -739,7 +741,7 @@ def wait_for_file(self, filename: str, timeout: int = 900) -> None:
Waits until the file exists in the machine's file system.
"""

def check_file(_: Any) -> bool:
def check_file(_last_try: bool) -> bool:
status, _ = self.execute(f"test -e {filename}")
return status == 0

Expand All @@ -754,7 +756,7 @@ def wait_for_open_port(
(default `localhost`).
"""

def port_is_open(_: Any) -> bool:
def port_is_open(_last_try: bool) -> bool:
status, _ = self.execute(f"nc -z {addr} {port}")
return status == 0

Expand All @@ -774,7 +776,7 @@ def wait_for_open_unix_socket(
"-uU" if is_datagram else "-U",
]

def socket_is_open(_: Any) -> bool:
def socket_is_open(_last_try: bool) -> bool:
status, _ = self.execute(f"nc {' '.join(nc_flags)} {addr}")
return status == 0

Expand All @@ -791,7 +793,7 @@ def wait_for_closed_port(
(default `localhost`).
"""

def port_is_closed(_: Any) -> bool:
def port_is_closed(_last_try: bool) -> bool:
status, _ = self.execute(f"nc -z {addr} {port}")
return status != 0

Expand Down Expand Up @@ -984,13 +986,13 @@ def wait_for_text(self, regex: str, timeout: int = 900) -> None:
:::
"""

def screen_matches(last: bool) -> bool:
def screen_matches(last_try: bool) -> bool:
variants = self.get_screen_text_variants()
for text in variants:
if re.search(regex, text) is not None:
return True

if last:
if last_try:
self.log(f"Last OCR attempt failed. Text was: {variants}")

return False
Expand All @@ -1008,7 +1010,7 @@ def wait_for_console_text(self, regex: str, timeout: int | None = None) -> None:
# to match multiline regexes.
console = io.StringIO()

def console_matches(_: Any) -> bool:
def console_matches(_last_try: bool) -> bool:
nonlocal console
try:
# This will return as soon as possible and
Expand Down Expand Up @@ -1154,7 +1156,7 @@ def wait_for_x(self, timeout: int = 900) -> None:
Wait until it is possible to connect to the X server.
"""

def check_x(_: Any) -> bool:
def check_x(_last_try: bool) -> bool:
cmd = (
"journalctl -b SYSLOG_IDENTIFIER=systemd | "
+ 'grep "Reached target Current graphical"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
let
drv = stdenv.mkDerivation rec {
pname = "controller-topology-project";
version = "1.0.0";
version = "1.0.1";

src = fetchFromGitHub {
owner = "kodi-game";
repo = "controller-topology-project";
rev = "v${version}";
sha256 = "sha256-6g4dyR34b0YgxlzRRS2C/gY3wjlO9MMYEB2fHLSCqC4=";
sha256 = "sha256-NRoI28LqXbsF6Icym98SWLHNl+WD8TsJ0P+ELf/JhyQ=";
};

postPatch = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-fishbmc";
namespace = "visualization.fishbmc";
version = "20.2.0";
version = "21.0.1";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-MgeSIKAy0N2NMGsU/15tKtDb34CROjcMaKjGyySl9Z0=";
hash = "sha256-JAiWkW9iaOq+Q2tArxJ+S7sXQM2K010uT09j30rTY0I=";
};

extraBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-goom";
namespace = "visualization.goom";
version = "20.1.1";
version = "21.0.1";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-TxXqJQdPT1+3DwAJv0F2Hfksh+ZV4QjfOnp4/k53GpQ=";
hash = "sha256-Cu0XRv2iU35bakbS5JkjSYAW5Enra1gt1I0sebcapx4=";
};

extraBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-pictureit";
namespace = "visualization.pictureit";
version = "20.2.0";
version = "21.0.1";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-mQDPjpsxStU01H2XJKnX183KAHG+O1CH8JOmApMmwMc=";
hash = "sha256-0soMNqff/aVANDFORL3mqUUpi2BWmauUtE4EBr3QwlI=";
};

extraBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-shadertoy";
namespace = "visualization.shadertoy";
version = "20.3.0";
version = "21.0.2";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-PaHbEcB4gCC8gUzc7T49msI8f0xa2iXqSaYW/eqD8yw=";
hash = "sha256-M70WQL4BqFI4LMFLBXlupuXxRkbTqA0OocYlCbY28VQ=";
};

extraBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-spectrum";
namespace = "visualization.spectrum";
version = "20.2.0";
version = "21.0.2";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-rl6eydHv0g646H7478UQboVp/OrKExQYJOiaVDeDRhE=";
hash = "sha256-8yGmZeLJ8AdT17yqYVxYbmkZ6DqhlCyblbTUzf8MhE4=";
};

extraBuildInputs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-waveform";
namespace = "visualization.waveform";
version = "20.2.1";
version = "21.0.1";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-e1SIpMmfnS92X4f114MKch4o9Ke80aIzw6OQPrEb8d0=";
hash = "sha256-ocLiDt9Fvwb/KvCsULyWRCNK0vOGMh/r88PRn1WYyXs=";
};

extraBuildInputs = [
Expand Down

0 comments on commit 90a1f88

Please sign in to comment.