1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") 2 3def define_common_targets(): 4 """Defines targets that should be shared between fbcode and xplat. 5 6 The directory containing this targets.bzl file should also contain both 7 TARGETS and BUCK files that call this function. 8 """ 9 10 _THREADPOOL_TESTS = [ 11 "threadpool_test.cpp", 12 ] + (["fb/threadpool_use_n_threads_test.cpp"] if not runtime.is_oss else []) 13 14 runtime.cxx_test( 15 name = "threadpool_test", 16 srcs = _THREADPOOL_TESTS, 17 deps = [ 18 "//executorch/extension/threadpool:threadpool", 19 ], 20 ) 21