android_local_test tests are very fragile

Open
#169 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Reproduce the failure with the reported Bazel command, then inspect //test/rules/android_local_test:java_launcher_test.bzl and the attached alt.log. Determine which android_local_test_default_launcher assertions depend on resolved JDK paths; done means the target passes with Bazel 7.0.0rc1 and the selected Java runtime.

Written by the indexing model from the issue text.

Description

At head, with Bazel 7.0.0rc1, these tests fail because the resolved JDK paths aren't what is expected:

USE_BAZEL_VERSION=7.0.0rc1 bazel   test   --enable_bzlmod=false   --incompatible_enable_android_toolchain_resolution=false   --java_runtime_version=17   -- //test/rules/android_local_test:android_local_test_default_launcher

FAIL: //test/rules/android_local_test:android_local_test_default_launcher (see /usr/local/google/home/jcater/.cache/bazel/_bazel_jcater/ddb4e20e0e2e6bca92f5deeef02ce168/execroot/rules_android/bazel-out/k8-fastbuild/testlogs/test/rules/android_local_test/android_local_test_default_launcher/test.log)
INFO: From Testing //test/rules/android_local_test:android_local_test_default_launcher:
==================== Test output for //test/rules/android_local_test:android_local_test_default_launcher:
In test _android_local_test_default_launcher from //test/rules/android_local_test:java_launcher_test.bzl: Expect runfiles to contains ../remotejdk17_linux/bin/java but was ...

(Full log attached)

alt.log

Dominant language
Java
Stars
205
Forks
113
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_android

All issues in bazelbuild/rules_android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.