- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
publish / publish (push) Successful in 51s
Signed-off-by: Randolph Sapp <rs@ti.com> |
||
| .forgejo/workflows | ||
| src/secern | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
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.