Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add run subcommand #89

Merged
merged 1 commit into from
Sep 2, 2021
Merged

Add run subcommand #89

merged 1 commit into from
Sep 2, 2021

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Sep 2, 2021

Closes #68

$ cargo llvm-cov run --help
cargo-llvm-cov-run 

Run a binary or example and generate coverage report

USAGE:
    cargo llvm-cov run [OPTIONS] [-- <ARGS>...]

ARGS:
    <ARGS>...
            Arguments for the test binary

OPTIONS:
        --json
            Export coverage data in "json" format
            
            If --output-path is not specified, the report will be printed to stdout.
            
            This internally calls `llvm-cov export -format=text`. See
            <https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-export> for more.

        --lcov
            Export coverage data in "lcov" format
            
            If --output-path is not specified, the report will be printed to stdout.
            
            This internally calls `llvm-cov export -format=lcov`. See
            <https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-export> for more.

        --text
            Generate coverage report in “text” format
            
            If --output-path or --output-dir is not specified, the report will be printed to stdout.
            
            This internally calls `llvm-cov show -format=text`. See
            <https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-show> for more.

        --html
            Generate coverage report in "html" format
            
            If --output-dir is not specified, the report will be generated in `target/llvm-cov/html`
            directory.
            
            This internally calls `llvm-cov show -format=html`. See
            <https://llvm.org/docs/CommandGuide/llvm-cov.html#llvm-cov-show> for more.

        --open
            Generate coverage reports in "html" format and open them in a browser after the
            operation.
            
            See --html for more.

        --summary-only
            Export only summary information for each file in the coverage data
            
            This flag can only be used together with either --json or --lcov.

        --output-path <PATH>
            Specify a file to write coverage data into.
            
            This flag can only be used together with --json, --lcov, or --text. See --output-dir for
            --html and --open.

        --output-dir <DIRECTORY>
            Specify a directory to write coverage report into (default to `target/llvm-cov`).
            
            This flag can only be used together with --text, --html, or --open. See also --output-
            path.

        --ignore-filename-regex <PATTERN>
            Skip source code files with file paths that match the given regular expression

        --no-report
            Run tests, but don't generate coverage report

    -q, --quiet
            No output printed to stdout

        --bin <NAME>...
            Name of the bin target to run

        --example <NAME>...
            Name of the example target to run

    -p, --package <SPEC>
            Package with the target to run

    -j, --jobs <N>
            Number of parallel jobs, defaults to # of CPUs

        --release
            Build artifacts in release mode, with optimizations

        --profile <PROFILE-NAME>
            Build artifacts with the specified profile

        --features <FEATURES>...
            Space or comma separated list of features to activate

        --all-features
            Activate all available features

        --no-default-features
            Do not activate the `default` feature

        --target <TRIPLE>
            Build for the target triple
            
            When this option is used, coverage for proc-macro and build script will not be displayed
            because cargo does not pass RUSTFLAGS to them.

    -v, --verbose
            Use verbose output
            
            Use -vv (-vvv) to propagate verbosity to cargo.

        --color <WHEN>
            Coloring [possible values: auto, always, never]

        --manifest-path <PATH>
            Path to Cargo.toml

        --frozen
            Require Cargo.lock and cache are up to date

        --locked
            Require Cargo.lock is up to date

        --offline
            Run without accessing the network

    -Z <FLAG>...
            Unstable (nightly-only) flags to Cargo

    -h, --help
            Print help information

@taiki-e
Copy link
Owner Author

taiki-e commented Sep 2, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 2, 2021

Build succeeded:

@bors bors bot merged commit 850c031 into main Sep 2, 2021
@bors bors bot deleted the run branch September 2, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cargo llvm-cov run subcommand
1 participant