Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android testing is broken with Bazel 4.2.1 #417

Open
meteorcloudy opened this issue Dec 1, 2021 · 5 comments
Open

Android testing is broken with Bazel 4.2.1 #417

meteorcloudy opened this issue Dec 1, 2021 · 5 comments

Comments

@meteorcloudy
Copy link

meteorcloudy commented Dec 1, 2021

https://buildkite.com/bazel/android-testing/builds/1621#cb6c258b-3b33-4421-8f99-d46a2118eece

(00:19:04) ERROR: /workdir/ui/espresso/IntentsAdvancedSample/BUILD.bazel:29:16: Building ui/espresso/IntentsAdvancedSample/libIntentsAdvancedSampleTestLib.jar (2 source files) failed: (Exit 1): java failed: error executing command
  (cd /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ec321eb2cc2d0f8f91b676b6d4c66c29/execroot/__main__ && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
    PATH=/var/lib/buildkite-agent/.cache/bazelisk/downloads/bazelbuild/bazel-4.2.1-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
  external/remotejdk11_linux/bin/java -XX:+UseParallelOldGC -XX:-CompactStrings '--patch-module=java.compiler=external/remote_java_tools_linux/java_tools/java_compiler.jar' '--patch-module=jdk.compiler=external/remote_java_tools_linux/java_tools/jdk_compiler.jar' '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' -jar external/remote_java_tools_linux/java_tools/JavaBuilder_deploy.jar @bazel-out/android-armeabi-v7a-fastbuild/bin/ui/espresso/IntentsAdvancedSample/libIntentsAdvancedSampleTestLib.jar-0.params @bazel-out/android-armeabi-v7a-fastbuild/bin/ui/espresso/IntentsAdvancedSample/libIntentsAdvancedSampleTestLib.jar-1.params)
Execution platform: @local_config_platform//:host
ui/espresso/IntentsAdvancedSample/app/src/androidTest/java/com/example/android/testing/espresso/intents/AdvancedSample/ImageViewHasDrawableMatcher.java:19: error: cannot find symbol
import androidx.test.espresso.matcher.BoundedDiagnosingMatcher;
                                     ^
  symbol:   class BoundedDiagnosingMatcher
  location: package androidx.test.espresso.matcher
ui/espresso/IntentsAdvancedSample/app/src/androidTest/java/com/example/android/testing/espresso/intents/AdvancedSample/ImageViewHasDrawableMatcher.java:32: error: cannot find symbol
        return new BoundedDiagnosingMatcher<View, ImageView>(ImageView.class) {
                   ^
  symbol:   class BoundedDiagnosingMatcher
  location: class ImageViewHasDrawableMatcher
ui/espresso/IntentsAdvancedSample/app/src/androidTest/java/com/example/android/testing/espresso/intents/AdvancedSample/ImageViewHasDrawableMatcher.java:33: error: method does not override or implement a method from a supertype
            @Override
            ^
ui/espresso/IntentsAdvancedSample/app/src/androidTest/java/com/example/android/testing/espresso/intents/AdvancedSample/ImageViewHasDrawableMatcher.java:38: error: method does not override or implement a method from a supertype
            @Override
            ^

Since Android Testing is broken with Bazel 4.2.1 for a long time, I'll disable it in Bazel downstream. Android testing will no longer get any test coverage with Bazel@HEAD, but we can re-enable it in downstream when this issue is fixed.

@meteorcloudy
Copy link
Author

/cc @brettchabot @jin

meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this issue Dec 6, 2021
Those projects are broken due to incompatible changes in Bazel and
didn't get fixed for a long time.

* Android Testing: android/testing-samples#417
* Tulsi: bazelbuild/tulsi#286
* rules_dotnet: bazel-contrib/rules_dotnet#268
* rules_haskell: tweag/rules_haskell#1650
* rules_k8s: bazelbuild/rules_k8s#668
* rules_d: removed because the project isn't maintained.
meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this issue Dec 6, 2021
Those projects are broken due to incompatible changes in Bazel and
didn't get fixed for a long time.

* Android Testing: android/testing-samples#417
* Tulsi: bazelbuild/tulsi#286
* rules_dotnet: bazel-contrib/rules_dotnet#268
* rules_haskell: tweag/rules_haskell#1650
* rules_k8s: bazelbuild/rules_k8s#668
* rules_d: removed because the project isn't maintained.
meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this issue Dec 7, 2021
Those projects are broken due to incompatible changes in Bazel and
didn't get fixed for a long time.

* Android Testing: android/testing-samples#417
* Tulsi: bazelbuild/tulsi#286
* rules_dotnet: bazel-contrib/rules_dotnet#268
* rules_haskell: tweag/rules_haskell#1650
* rules_k8s: bazelbuild/rules_k8s#668
* rules_d: removed because the project isn't maintained.
@mrk-han
Copy link
Contributor

mrk-han commented Aug 25, 2023

All of the bazel builds are still failing every day -- we can either make a ticket to address these if we find Bazel Experimental Support still worth showing people how to do, or we can disable the automatic trigger + remove from the readme (maybe a product decision perhaps?)

https://buildkite.com/bazel/android-testing/builds?branch=main

@brettchabot
Copy link
Collaborator

@jin @ahumesky should we just disable bazel support in this project for now?

@ahumesky
Copy link
Contributor

ahumesky commented Aug 25, 2023

We're currently open sourcing a starlark version of android_instrumentation_test, so I think that as part of that project we can (and should) fix up the example here both to a) work and b) use the starlark version of android_instrumentation_test. For now I think disabling the tests sounds right, since there's no sense in repeatedly running tests that will always fail. As we open source the starlark version of android_instrumenation_test over the next few months I think we can also use these to test the rule.

@mrk-han
Copy link
Contributor

mrk-han commented Aug 25, 2023

It'd be awesome to see this repo test the new starlark version of android_instrumentation_test.

Disabling sounds great, especially if y'all can add a task to fix these examples as part of starlark's open source acceptance criteria IMHO

fmeum pushed a commit to fmeum/continuous-integration that referenced this issue Dec 10, 2023
Those projects are broken due to incompatible changes in Bazel and
didn't get fixed for a long time.

* Android Testing: android/testing-samples#417
* Tulsi: bazelbuild/tulsi#286
* rules_dotnet: bazel-contrib/rules_dotnet#268
* rules_haskell: tweag/rules_haskell#1650
* rules_k8s: bazelbuild/rules_k8s#668
* rules_d: removed because the project isn't maintained.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants