Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kernelci/kbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ def _build_with_tuxmake(self):
else:
targets = ["kernel", "modules"]
if self._arch not in DTBS_DISABLED:
targets.append("dtbs")
targets.extend(["dtbs", "dtbs-legacy"])
if self._extra_targets:
targets.extend(self._extra_targets)
cmd_parts.append(" ".join(targets))
Expand Down
27 changes: 25 additions & 2 deletions tests/test_kbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ def test_names_identify_build_results(self, tmp_path):
]


def _tuxmake_invocations(tmp_path, monkeypatch, kselftest, dtbs_check=False):
def _tuxmake_invocations(
tmp_path, monkeypatch, kselftest, dtbs_check=False, arch="x86_64"
):
monkeypatch.setitem(sys.modules, "tuxmake", None)
kbuild = _kbuild(tmp_path)
kbuild = _kbuild(tmp_path, arch=arch)
kbuild._dtbs_check = dtbs_check
kbuild._kselftest = kselftest
kbuild._extra_targets = []
Expand Down Expand Up @@ -219,6 +221,27 @@ def test_no_kselftest_build_for_dtbs_check(self, tmp_path, monkeypatch):
assert kernel.split()[-1] == "dtbs_check"


class TestTuxmakeDtbsTargets:
def test_dtbs_legacy_requested_with_dtbs(self, tmp_path, monkeypatch):
(kernel,) = _tuxmake_invocations(
tmp_path, monkeypatch, False, arch="arm64"
)

assert kernel.split()[-4:] == [
"kernel",
"modules",
"dtbs",
"dtbs-legacy",
]

def test_no_dtbs_targets_when_disabled(self, tmp_path, monkeypatch):
(kernel,) = _tuxmake_invocations(
tmp_path, monkeypatch, False, arch="x86_64"
)

assert kernel.split()[-2:] == ["kernel", "modules"]


def _kbuild_from_params(monkeypatch, **params):
monkeypatch.setenv("KCI_API_TOKEN", "test-token")
params = {
Expand Down