Commit Graph

4 Commits

Author SHA1 Message Date
James Price fe0c2a73e7 tint: TINT_EMIT_COVERAGE -> DAWN_EMIT_COVERAGE
Change-Id: Ic215fba55238d89f9790f071361e29fddfc3624d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116340
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-01-04 18:06:49 +00:00
Ben Clayton 5af571bcbc Document the process of generating code coverage
Update the script to check coverage generation is enabled, and provide a sensible error message if it is not.

Change-Id: I42f2b97d18bb3be2d081200cb682ea310476943f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70520
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2021-11-23 17:57:37 +00:00
Ben Clayton 2abecbba16 Always emit coverage, even if the exe returns non-zero
Coverage can be useful for debugging unfamiliar code. If the bug causes a non-zero exit, then we still want the coverage to be generated.

Change-Id: I2d218cd4bb1395c71553e1baab78fb6ca9d41cca
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35422
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-12 16:19:54 +00:00
Ben Clayton adb10d60de Add option and target for generating code cov info
The new `tint-generate-coverage` CMake target can be used with the clang toolchain to generate a `lcov.info` file at the root of the project, along with a `coverage.summary` human readable plain text file.

The `lcov.info` file can then be used by various tools to display code coverage information in your IDE / code editor.

Useful for ensuring decent test coverage.

Change-Id: I3d846f6da3af25d3d600d8e028f27b89e35b545f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31121
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-27 21:04:59 +00:00