bazelbuild/bazel

`bazel run --script_path=test` fails silently when target uses `shard_count`

Open

#16,193 创建于 2022年8月30日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Java (4,465 fork)batch import
P3help wantedteam-OSStype: bug

仓库指标

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

描述

Description of the bug:

When you run bazel run --script_path=test <target> and the target is a test target that uses shard_count, Bazel exits with status code 2 with no indication of why.

The expected behavior is either that it succeeds (preferred) or that Bazel prints a diagnostic that explains that --script_path cannot be used on targets that use shard_count. In the latter case, this limitation should also be mentioned in the documentation for --script_path.

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

Minimal example: https://github.com/jfirebaugh/bazel_cc_test_output/tree/script_path

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

release 5.3.0

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

No response

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

贡献者指南