bazelbuild/bazel

docs: --nocache_test_results may actually not always be required for coverage

Open

#15,611 创建于 2022年6月2日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)Java (4,465 fork)batch import
P3coveragehelp wantedteam-Documentationteam-Rules-Servertype: bug

仓库指标

Star
 (25,384 star)
PR 合并指标
 (平均合并 22天 20小时) (30 天内合并 77 个 PR)

描述

Description of the bug:

https://bazel.google.cn/docs/coverage?hl=en#remote-execution

Bazel will currently fail to create coverage information if tests have been cached previously. To work around this, --nocache_test_results can be set specifically for coverage runs, although this of course incurs a heavy cost in terms of test times.

While actually it seems that coverage information can be retrieved from remote cache (at least when test were run locally and only cached remotely?)

$ bazel coverage //:something
//:something                                 (cached) PASSED in 2.2s

  /..../.cache/bazel/..../bazel-out/k8-fastbuild/testlogs/...../coverage.dat

baseline_coverage.dat file is also present

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

NixOS

What is the output of bazel info release?

release 5.1.1- (@non-git)

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

NixOS nixpkgs

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

贡献者指南