From c37210b74089eb82b17af912e411f61045e564d1 Mon Sep 17 00:00:00 2001 From: Antonio Date: Thu, 19 Dec 2024 12:10:12 +0000 Subject: [PATCH] Make it possible to set a default build_mode for RE tests via .buckconfig --- prelude/decls/re_test_common.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prelude/decls/re_test_common.bzl b/prelude/decls/re_test_common.bzl index 4a9e7240875b..9c12dec111d1 100644 --- a/prelude/decls/re_test_common.bzl +++ b/prelude/decls/re_test_common.bzl @@ -45,10 +45,14 @@ def _opts_for_tests_arg() -> Attr: def _action_key_provider_arg() -> Attr: if is_full_meta_repo(): default_build_mode = read_root_config("fb", "remote_execution_test_build_mode", "fbcode//buck2/platform/build_mode:build_mode") + else: + default_build_mode = read_root_config("re", "remote_execution_test_build_mode") + if default_build_mode != None: return attrs.dep(providers = [BuildModeInfo], default = default_build_mode) else: return attrs.option(attrs.dep(providers = [BuildModeInfo]), default = None) + def _test_args() -> dict[str, Attr]: return { "remote_execution": attrs.option(