Skip to main content

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:

  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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secern-0.1.2.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secern-0.1.2-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file secern-0.1.2.tar.gz.

File metadata

  • Download URL: secern-0.1.2.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for secern-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7289ffe44e2eca2a0ff1b94e12a842d36745338bac4c878d335bf8cd5a03d52b
MD5 e2b3ff076ab68769a2801b107a315d9a
BLAKE2b-256 f8d7580c1836a2dc1a9b6440f6201440db1393e2c28d3cba60b5ff1b2734c65e

See more details on using hashes here.

File details

Details for the file secern-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: secern-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for secern-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ad143f8dd86b7ad66298704eed0a0bc1f7a7d960a73341fc5257d0dd5794e38
MD5 05d50e9f08fabee34b4001c6838bf6fb
BLAKE2b-256 1d48595404690ac19b8ad5b37fd69abe1143fb4bc3ad4ecc16f7c11b764c29c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page