Closed nlou9 closed 1 year ago
Hi @nlou9, Could you please help us to reproduce this ?
I just realized that the default instrumentation filter
is "^//tests/ci/scripts[/:]"
for py_test
. After I set it into --instrumentation_filter="^//"
, it works. Why does it set the default instrumentation filter as tests directory for this py_test
?
py_test(
name = "test_ci",
srcs = [
"__test__.py",
"test_ci.py",
],
data = ["//:config"],
main = "__test__.py",
deps = [
"//ci/scripts",
"//tests/data",
requirement("click"),
requirement("mock"),
requirement("pytest"),
],
)
When no instrumentation filter is provided, one is heuristically calculated.
Broadly speaking, the calculated filter will be:
javatests
with java
and test/java
with main/java
/tests
, /internal
, /public
from the packagesSince //tests/ci/scripts:test_ci
doesn't match any of those patterns, nothing is changed.
Description of the bug:
.bazelrc
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?
darwin-x86_64
What is the output of
bazel info release
?% bazel info release INFO: Invocation ID: 9c0fa5ad-bf7a-46b3-a192-4b23f4f9a4d0 release 6.1.2
If
bazel info release
returnsdevelopment 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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
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