Skip to content

ENH: Add an output parameter for coverage #315

@ganesh-k13

Description

@ganesh-k13

ENH: Add an output parameter for coverage

Today spin test --coverage hardcodes the output to HTML in a default location:

spin/spin/cmds/meson.py

Lines 622 to 626 in 1713846

pytest_args = [
*pytest_args,
"--cov-report=term",
f"--cov-report=html:{coverage_dir}",
f"--cov={package}",

Proposal

Enhance the coverage flag to take <format>:<location> as input. So some of the options will look like:

spin test --coverage # Default behavior for backward compatibility
spin test --coverage xml # Only format, default output to `{coverage_dir}`
spin test --coverage xml:/var/tmp/cov.xml # Format+location

This will mainly help in CI builds to upload artifacts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions