Metadata-Version: 2.4
Name: secern
Version: 0.1.2
Summary: A pytest wrapper for validating kernel patches
Author-email: Randolph Sapp <rs@ti.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-Expression: GPL-3.0-or-later
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: POSIX
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Version Control :: Git
License-File: LICENSE
Requires-Dist: GitPython~=3.1
Requires-Dist: pytest~=9.0
Project-URL: Source, https://codeberg.org/StaticRocket/secern

# 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.](https://github.com/pypa/pip/issues/6264)

