From eaf3323121055e75cdbeaf4667bc4799ed877a93 Mon Sep 17 00:00:00 2001 From: Alexey Kozhevnikov Date: Tue, 16 May 2023 17:03:53 -0700 Subject: [PATCH] Partial back out "[buck2][android] android_emulators rule" Summary: Better solution is to just ignore local resource types in test provider which is done in D45818088 This diff partially backs out D45815384 except for change introduced in D45818088. Reviewed By: IanChilds Differential Revision: D45867323 fbshipit-source-id: d5b8cb4274d0c723b151200d6eaaa43abd57d508 --- prelude/android/android.bzl | 1 - prelude/android/user/android_emulators.bzl | 28 ---------------------- prelude/user/all.bzl | 2 -- 3 files changed, 31 deletions(-) delete mode 100644 prelude/android/user/android_emulators.bzl diff --git a/prelude/android/android.bzl b/prelude/android/android.bzl index 9d667d36..cee9c21a 100644 --- a/prelude/android/android.bzl +++ b/prelude/android/android.bzl @@ -155,7 +155,6 @@ extra_attributes = { "_java_toolchain": java_toolchain_for_android(), }, "android_instrumentation_test": { - "_android_emulators": attrs.default_only(attrs.dep(default = "fbsource//xplat/buck2/platform/android:android_emulators", providers = [LocalResourceInfo])), "_android_toolchain": android_toolchain(), "_java_toolchain": java_toolchain_for_android(), }, diff --git a/prelude/android/user/android_emulators.bzl b/prelude/android/user/android_emulators.bzl deleted file mode 100644 index aae15f59..00000000 --- a/prelude/android/user/android_emulators.bzl +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//user:rule_spec.bzl", "RuleRegistrationSpec") - -def _impl(ctx: "context") -> ["provider"]: - return [ - DefaultInfo(), - LocalResourceInfo( - source_target = ctx.label, - setup = cmd_args([ctx.attrs.broker[RunInfo]]), - resource_env_vars = { - "ANDROID_SERIAL": "serial_number", - }, - ), - ] - -registration_spec = RuleRegistrationSpec( - name = "android_emulators", - impl = _impl, - attrs = { - "broker": attrs.exec_dep(providers = [RunInfo]), - }, -) diff --git a/prelude/user/all.bzl b/prelude/user/all.bzl index 81bcb4dd..a33a5e15 100644 --- a/prelude/user/all.bzl +++ b/prelude/user/all.bzl @@ -5,7 +5,6 @@ # License, Version 2.0 found in the LICENSE-APACHE file in the root directory # of this source tree. -load("@prelude//android/user:android_emulators.bzl", _android_emulators_spec = "registration_spec") load("@prelude//apple/user:apple_resource_bundle.bzl", _apple_resource_bundle_spec = "registration_spec") load("@prelude//apple/user:apple_selective_debugging.bzl", _apple_selective_debugging_spec = "registration_spec") load("@prelude//apple/user:apple_simulators.bzl", _apple_simulators_spec = "registration_spec") @@ -19,7 +18,6 @@ load(":extract_archive.bzl", _extract_archive_spec = "registration_spec") _all_specs = [ _extract_archive_spec, - _android_emulators_spec, _apple_tools_spec, _apple_selective_debugging_spec, _apple_resource_bundle_spec,