Skip to content

Commit 8f1863c

Browse files
committed
Remove dynamic installation of KMT dependencies
1 parent 4772009 commit 8f1863c

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/dda/cli/inv/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,11 @@ def cmd(app: Application, *, args: tuple[str, ...], no_dynamic_deps: bool) -> No
4040
features.append("legacy-test-infra-definitions")
4141
elif task.startswith("system-probe."):
4242
features.append("legacy-btf-gen")
43-
elif task.startswith("kmt."):
44-
features.append("legacy-kernel-matrix-testing")
4543

4644
if no_dynamic_deps:
4745
import sys
4846

4947
app.subprocess.replace_current_process([sys.executable, "-m", "invoke", *args])
50-
return
5148

5249
venv_path = app.config.storage.join("venvs", "legacy").data
5350
with app.tools.uv.virtual_env(venv_path) as venv:

tests/cli/inv/test_inv.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717

1818
def test_default(dda, helpers, temp_dir, uv_on_path, mocker):
19-
replace_current_process = mocker.patch("dda.utils.process.SubprocessRunner.replace_current_process")
19+
replace_current_process = mocker.patch(
20+
"dda.utils.process.SubprocessRunner.replace_current_process",
21+
side_effect=lambda *args, **kwargs: sys.exit(0), # noqa: ARG005
22+
)
2023
subprocess_run = mocker.patch("subprocess.run", return_value=subprocess.CompletedProcess([], returncode=0))
2124

2225
result = dda("inv", "foo")
@@ -73,7 +76,10 @@ def test_default(dda, helpers, temp_dir, uv_on_path, mocker):
7376

7477

7578
def test_no_dynamic_deps_flag(dda, mocker):
76-
replace_current_process = mocker.patch("dda.utils.process.SubprocessRunner.replace_current_process")
79+
replace_current_process = mocker.patch(
80+
"dda.utils.process.SubprocessRunner.replace_current_process",
81+
side_effect=lambda *args, **kwargs: sys.exit(0), # noqa: ARG005
82+
)
7783

7884
result = dda("inv", "--no-dynamic-deps", "foo")
7985

@@ -93,7 +99,10 @@ def test_no_dynamic_deps_flag(dda, mocker):
9399

94100

95101
def test_no_dynamic_deps_env_var(dda, mocker):
96-
replace_current_process = mocker.patch("dda.utils.process.SubprocessRunner.replace_current_process")
102+
replace_current_process = mocker.patch(
103+
"dda.utils.process.SubprocessRunner.replace_current_process",
104+
side_effect=lambda *args, **kwargs: sys.exit(0), # noqa: ARG005
105+
)
97106

98107
with EnvVars({AppEnvVars.NO_DYNAMIC_DEPS: "1"}):
99108
result = dda("inv", "foo")

0 commit comments

Comments
 (0)