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

貢獻者指南