1load( 2 "//tools/build_defs/oss:rn_defs.bzl", 3 "ANDROID", 4 "APPLE", 5 "CXX", 6 "get_apple_compiler_flags", 7 "get_apple_inspector_flags", 8 "get_preprocessor_flags_for_build_mode", 9 "react_native_xplat_target", 10 "rn_xplat_cxx_library", 11 "subdir_glob", 12) 13 14APPLE_COMPILER_FLAGS = get_apple_compiler_flags() 15 16rn_xplat_cxx_library( 17 name = "test_utils", 18 srcs = [], 19 headers = glob( 20 ["**/*.h"], 21 exclude = glob(["tests/**/*.h"]), 22 ), 23 header_namespace = "", 24 exported_headers = subdir_glob( 25 [ 26 ("", "*.h"), 27 ], 28 prefix = "react/test_utils", 29 ), 30 compiler_flags_pedantic = True, 31 fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, 32 fbobjc_frameworks = ["Foundation"], 33 fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(), 34 force_static = True, 35 labels = [ 36 "pfh:ReactNative_CommonInfrastructurePlaceholder", 37 ], 38 macosx_tests_override = [], 39 platforms = (ANDROID, APPLE, CXX), 40 preprocessor_flags = [ 41 "-DLOG_TAG=\"ReactNative\"", 42 "-DWITH_FBSYSTRACE=1", 43 ], 44 tests = [], 45 visibility = ["PUBLIC"], 46 deps = [ 47 "//xplat/jsi:jsi", 48 react_native_xplat_target("butter:butter"), 49 react_native_xplat_target("react/debug:debug"), 50 ], 51 exported_deps = [ 52 "//xplat/third-party/gmock:gmock", 53 ], 54) 55