Skip to content

file_test external workspace regex too loose #25944

@somethingvague

Description

@somethingvague

Description of the bug:

file_test assumes that a file whose name has "external" in it is in an external workspace. The executable then fails to find the runfile.

A repro is here: https://github.com/somethingvague/external-file-test-repro

The offending regex is here: https://github.com/bazelbuild/bazel/blob/master/tools/build_rules/test_rules.bzl#L22

It should probably be external/.* so that the "/" is always matched.

Which category does this issue belong to?

No response

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

See this repro: https://github.com/somethingvague/external-file-test-repro

Which operating system are you running Bazel on?

Linux/Mac

What is the output of bazel info release?

release 8.2.1

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 HEAD ?


If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

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

Metadata

Metadata

Assignees

Labels

team-Rules-APIAPI for writing rules/aspects: providers, runfiles, actions, artifactstype: buguntriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions