A pytest wrapper for validating kernel patches
Project description
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:
- Positional arguments on the command line
- The configuration file's
testpathskey - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secern-0.0.1.tar.gz.
File metadata
- Download URL: secern-0.0.1.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c557352fe07cc9e04c4e9d4e6ef471b5922a7ac1efb864d181d3aa8411bca66
|
|
| MD5 |
316a115611e9d44bf21c5672738bc682
|
|
| BLAKE2b-256 |
3aee37b6f2b2071a88d551e15dd855517084e14bf6f79822cc160874bde9492b
|
File details
Details for the file secern-0.0.1-py3-none-any.whl.
File metadata
- Download URL: secern-0.0.1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f2d9dc3f8726a275a16306d2d5796fe90b63c023061b3e4ffa2b021aed9113
|
|
| MD5 |
abd03a0dc86f36899c24ae11d3166fe0
|
|
| BLAKE2b-256 |
9b9daa815effb930a7968bab82f8c6a07f354e3ab4500fa432109477d76c6c68
|