diff --git a/build_extensions/android_app_instrumentation_tests.bzl b/build_extensions/android_app_instrumentation_tests.bzl index 675f6fcd18..6f30111cc8 100644 --- a/build_extensions/android_app_instrumentation_tests.bzl +++ b/build_extensions/android_app_instrumentation_tests.bzl @@ -23,7 +23,9 @@ def android_app_instrumentation_tests( library_args = {}, binary_args = {}, **kwargs): - """A macro for an instrumentation test whose target under test is an android_binary. + """DEPRECATED: use axt_android_library_test instead. + + A macro for an instrumentation test whose target under test is an android_binary. The intent of this wrapper is to simplify the build API for creating instrumentation test rules for simple cases, while still supporting build_cleaner for automatic dependency management. diff --git a/espresso/idling_resource/javatests/androidx/test/espresso/BUILD b/espresso/idling_resource/javatests/androidx/test/espresso/BUILD index 5b3f284f7d..946b8d0c7d 100644 --- a/espresso/idling_resource/javatests/androidx/test/espresso/BUILD +++ b/espresso/idling_resource/javatests/androidx/test/espresso/BUILD @@ -2,17 +2,17 @@ # Tests for espresso idling resources load( - "//build_extensions:android_library_instrumentation_tests.bzl", - "android_library_instrumentation_tests", + "//build_extensions:android_library_test.bzl", + "axt_android_library_test", ) package(default_applicable_licenses = ["//espresso:license"]) licenses(["notice"]) -android_library_instrumentation_tests( - name = "instrumentation_tests", - srcs = glob(["**/*.java"]), +axt_android_library_test( + name = "IdlingRegistryTest", + srcs = ["IdlingRegistryTest.java"], deps = [ "//core", "//espresso/idling_resource/java/androidx/test/espresso:idling_resource_internal", diff --git a/espresso/idling_resource/javatests/androidx/test/espresso/idling/BUILD b/espresso/idling_resource/javatests/androidx/test/espresso/idling/BUILD new file mode 100644 index 0000000000..42dbd8dc59 --- /dev/null +++ b/espresso/idling_resource/javatests/androidx/test/espresso/idling/BUILD @@ -0,0 +1,24 @@ +# Description: +# Tests for espresso idling resources + +load( + "//build_extensions:android_library_test.bzl", + "axt_android_library_test", +) + +package(default_applicable_licenses = ["//espresso:license"]) + +licenses(["notice"]) + +axt_android_library_test( + name = "CountingIdlingResourceTest", + srcs = ["CountingIdlingResourceTest.java"], + deps = [ + "//core", + "//espresso/idling_resource/java/androidx/test/espresso:idling_resource_internal", + "//ext/junit", + "//runner/android_junit_runner", + "@maven//:junit_junit", + "@maven//:org_mockito_mockito_core", + ], +) diff --git a/espresso/idling_resource/net/javatests/androidx/test/espresso/idling/net/BUILD b/espresso/idling_resource/net/javatests/androidx/test/espresso/idling/net/BUILD index dbf52ec456..c804ce1746 100644 --- a/espresso/idling_resource/net/javatests/androidx/test/espresso/idling/net/BUILD +++ b/espresso/idling_resource/net/javatests/androidx/test/espresso/idling/net/BUILD @@ -2,17 +2,17 @@ # Tests for Network Idling Resources load( - "//build_extensions:android_library_instrumentation_tests.bzl", - "android_library_instrumentation_tests", + "//build_extensions:android_library_test.bzl", + "axt_android_library_test", ) package(default_applicable_licenses = ["//espresso:license"]) licenses(["notice"]) -android_library_instrumentation_tests( - name = "instrumentation_tests", - srcs = glob(["**/*.java"]), +axt_android_library_test( + name = "UriIdlingResourceTest", + srcs = ["UriIdlingResourceTest.java"], deps = [ "//espresso/idling_resource/java/androidx/test/espresso:idling_resource_internal", "//espresso/idling_resource/net/java/androidx/test/espresso/idling/net:uri_idling_resource",