A pytest wrapper for validating kernel patches before submission.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Randolph Sapp 96da313ace
All checks were successful
publish / publish (push) Successful in 51s
chore: bump version to trigger publish
Signed-off-by: Randolph Sapp <rs@ti.com>
2026-06-26 02:07:28 -05:00
.forgejo/workflows ci: use if else to set changed value 2026-06-26 01:59:48 -05:00
src/secern chore: bump version to trigger publish 2026-06-26 02:07:28 -05:00
.gitignore feat: init 2026-05-14 16:08:06 -05:00
LICENSE feat: init 2026-05-14 16:08:06 -05:00
pyproject.toml ci: build and publish with flit 2026-06-26 01:35:20 -05:00
README.md chore: rename to secern 2026-06-19 01:09:40 -05:00

Secern

A pytest wrapper for validating kernel patches before submission.

Usage

Using the secern command will initiate a session with a repo auto fixture. This will execute all tests against the specified git revisions passed with --rev-parse. If no --rev-parse is specified, the HEAD of the repo will be tested.

Secern provides built in tests for some projects. To specify a built in test group, use the --group argument. Available groups are listed in --help.

Tests known to take a long time are marked as slow. You can avoid them by specifying -m 'not slow'.

The user may also load external tests with the --external-tests parameter. This re-enables pytest's default search mechanism. Currently this means it will stop at the first option available below:

  1. Positional arguments on the command line
  2. The configuration file's testpaths key
  3. The invocation directory

Any local changes (tracked or otherwise) are stashed before any tests are executed and are automatically reapplied at the end of the test session. Please note that this operation may take more time if there are a lot of modifications.

This is done because some temporary files from builds or un-tracked modifications may interfere with tests. It's generally better to clean the directory yourself before running any tests.

Plugins

Most plugins will work with secern, with the exception of anything that expects to invoke pytest directly on it's own. This means some parallelization tools like pytest-xdist will not work. This is a benefit though.

Fixtures are used to lock the git repo state within the scope of a test session. If there are multiple versions of secern running at once this lock breaks down and the repo initial and active state can no longer be tracked reasonably.

This is the primary reason why secern is presented as a wrapper instead of a standard plugin.

FAQ

Why does a local pip install . list this package as UNKNOWN-0.0.0? Upgrade pip or use a virtual environment.