Skip to content

Commit

Permalink
deps: be verbose when installing snaps
Browse files Browse the repository at this point in the history
Otherwise things might look like they're hanging.
  • Loading branch information
Saviq committed Nov 19, 2024
1 parent 2e72fd7 commit a526aca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mir-ci/mir_ci/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib
import shutil
import subprocess
import time
import warnings
from collections.abc import Iterator
from typing import Any, Generator, List, Mapping, Optional, Union
Expand Down Expand Up @@ -104,7 +105,14 @@ def _deps_install(request: pytest.FixtureRequest, spec: Union[str, Mapping[str,
subprocess.check_call(("snap", "list", snap), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError:
_classic = ("--classic",) if classic else ()
subprocess.check_call(("sudo", "snap", "install", snap, "--channel", channel, *_classic))
subprocess.check_call(

Check warning on line 108 in mir-ci/mir_ci/conftest.py

View check run for this annotation

Codecov / codecov/patch

mir-ci/mir_ci/conftest.py#L108

Added line #L108 was not covered by tests
("sudo", "snap", "install", "--no-wait", snap, "--channel", channel, *_classic)
)
while (output := subprocess.check_output(("snap", "changes"), text=True)) and "Doing" in output:
for line in output.splitlines():
if "Doing" in line:
print(line)
time.sleep(30)

Check warning on line 115 in mir-ci/mir_ci/conftest.py

View check run for this annotation

Codecov / codecov/patch

mir-ci/mir_ci/conftest.py#L114-L115

Added lines #L114 - L115 were not covered by tests
if shutil.which(f"/snap/{snap}/current/bin/setup.sh"):
subprocess.check_call(("sudo", f"/snap/{snap}/current/bin/setup.sh"))
subprocess.call(
Expand Down

0 comments on commit a526aca

Please sign in to comment.