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

Save test coverage data to bazel-testlogs. #1387

Merged
merged 2 commits into from
Mar 16, 2018

Commits on Mar 16, 2018

  1. Save test coverage data to bazel-testlogs.

    This lets `bazel coverage //some:test` produce a Go coverage data file
    in `bazel-testlogs/some/test/coverage.dat`. This file can be processed
    by normal Go coverage tooling to produce a coverage report.
    
    The change to `go/private/rules/test.bzl` needs some explanation --
    Bazel only looks for coverage data if the test target has an
    `InstrumentedFilesProvider`, but this provider can currently only be
    created using "legacy" provider syntax. Old and new provider syntaxes
    can be combined by putting new-style providers in a `providers` field
    of the old-style struct.
    
    If the provider is found and at least one source file is present, Bazel
    will set the `COVERAGE_OUTPUT_FILE` environment variable during tests
    and will save that file to the build events + test outputs.
    jmillikin-stripe committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    a624fe1 View commit details
    Browse the repository at this point in the history
  2. copy comment from commit message

    Jay Conrod committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    fe154b4 View commit details
    Browse the repository at this point in the history