You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new java runfiles library in @bazel_tools//tools/runfiles, coming out with Bazel 0.11.0, should not pick up $TEST_SRCDIR when neither $RUNFILES_MANIFEST_FILE nor $RUNFILES_DIR is defined. In case a test runs Bazel to build and run a mock java_binary that uses the new runfiles library, the binary should not pick up the test's $TEST_SRCDIR but find its own runfiles insated.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Ironically this bug does not affect Bazel on Windows, because the native launcher we use for xx_binary rules sets RUNFILES_MANIFEST_{FILE,PATH} and RUNFILES_DIR.
Update //src/test/py/bazel:runfiles_test to test
that the Java (and Python) runfiles libraries do
NOT pick up TEST_SRCDIR from their environment.
See https://bazel-review.googlesource.com/c/bazel/+/37190
See #4598
Change-Id: I06eb50c8cb4c93a331e51cd38ebdd7c1bcf38bba
PiperOrigin-RevId: 184994372
The Python runfiles library will no longer pick up
the runfiles directory from $TEST_SRCDIR.
This is in accordance with the Java runfiles
library, see the motivation in
#4598
The commit also adds a test for this functionality
as well as exercising that the runfiles library
can find the runfiles directory even if no
RUNFILES_* envvars are exported.
See #4598
See #4460
Change-Id: I6e4d154cdca66b29d7c6e77743cf8109638238b5
PiperOrigin-RevId: 185009819
Description of the problem / feature request:
The new java runfiles library in
@bazel_tools//tools/runfiles
, coming out with Bazel 0.11.0, should not pick up$TEST_SRCDIR
when neither$RUNFILES_MANIFEST_FILE
nor$RUNFILES_DIR
is defined. In case a test runs Bazel to build and run a mockjava_binary
that uses the new runfiles library, the binary should not pick up the test's$TEST_SRCDIR
but find its own runfiles insated.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Cherry-pick https://bazel-review.googlesource.com/c/bazel/+/37210 into a Bazel repo:
bazel test //src/test/py/bazel:runfiles_test
This fails.
Now add the bugfix, and run the test again:
The test should now pass.
What operating system are you running Bazel on?
Debian testing.
What's the output of
bazel info release
?Any other information, logs, or outputs that you want to share?
This is blocking #3959.
https://bazel-review.googlesource.com/c/bazel/+/37190 will fix it.
The text was updated successfully, but these errors were encountered: