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
6 changes: 5 additions & 1 deletion docs/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,13 @@ which is copied into the output directory as `headers.tar.xz`.

## kselftest

Build the kernsel selftests. The resulting, installed tests are compressed in a
Build the kernel selftests. The resulting, installed tests are compressed in a
tarball which is copied into the output directory as `kselftest.tar.xz`.

This target depends on the `headers` target. The selftests build against the
UAPI headers in the build directory, so they must be installed first. This is
the same order the kernel uses for its own `make kselftest` target.

TuxMake doesn't do anything special with regards to which tests are built, so
by default it will build everything that kselftest builds by default. If you
want to build a subset of the tests, you can use the same mechanism that you
Expand Down
4 changes: 2 additions & 2 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,10 +1124,10 @@ def test_vmlinux(self, linux):


class TestKselftest:
def test_kselftest_depends_on_config(self, linux):
def test_kselftest_depends_on_config_and_headers(self, linux):
build = Build(tree=linux, targets=["kselftest"])
names = [t.name for t in build.targets]
assert names == ["config", "kselftest"]
assert names == ["config", "headers", "kselftest"]

def test_nonfatal_continues_on_failure(self, linux, mocker):
b = Build(tree=linux, targets=["config"])
Expand Down
2 changes: 1 addition & 1 deletion tuxmake/target/kselftest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[target]
description = "Kernel selftest (kselftest)"
dependencies = config
dependencies = config headers
nonfatal = true
commands = {make} -C tools/testing/selftests all
&& {make} -i -C tools/testing/selftests install
Expand Down
Loading