diff --git a/devtools/bundled_program/schema/test/BUCK b/devtools/bundled_program/schema/test/BUCK index 3f3e1a3d319..9f3ea02867a 100644 --- a/devtools/bundled_program/schema/test/BUCK +++ b/devtools/bundled_program/schema/test/BUCK @@ -1,4 +1,17 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/devtools/bundled_program/test/BUCK when resolving target fbsource//xplat/executorch/devtools/bundled_program/test/BUCK:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/schema/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") + + +fbcode_target(_kind = python_unittest, + name = "schema", + srcs = [ + "test_schema.py", + ], +) diff --git a/devtools/bundled_program/schema/test/TARGETS b/devtools/bundled_program/schema/test/TARGETS deleted file mode 100644 index 6c0b5ff7260..00000000000 --- a/devtools/bundled_program/schema/test/TARGETS +++ /dev/null @@ -1,10 +0,0 @@ -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "schema", - srcs = [ - "test_schema.py", - ], -) diff --git a/devtools/bundled_program/serialize/TARGETS b/devtools/bundled_program/serialize/BUCK similarity index 86% rename from devtools/bundled_program/serialize/TARGETS rename to devtools/bundled_program/serialize/BUCK index 1cacc04dc18..ae920d1e4c2 100644 --- a/devtools/bundled_program/serialize/TARGETS +++ b/devtools/bundled_program/serialize/BUCK @@ -1,10 +1,11 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") # Use runtime.python_library instead of the one defined in python_library.bzl, # so we can have access to EXECUTORCH_CLIENTS list. -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "lib", srcs = [ "__init__.py", diff --git a/devtools/bundled_program/serialize/test/BUCK b/devtools/bundled_program/serialize/test/BUCK index 7a2e1e302d8..e3cb3fbe279 100644 --- a/devtools/bundled_program/serialize/test/BUCK +++ b/devtools/bundled_program/serialize/test/BUCK @@ -1,4 +1,22 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/devtools/bundled_program/serialize/test/BUCK when resolving target fbsource//xplat/executorch/devtools/bundled_program/serialize/test/BUCK:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/serialize/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") + + +fbcode_target(_kind = python_unittest, + name = "serialize", + srcs = [ + "test_serialize.py", + ], + deps = [ + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/devtools/bundled_program/util:test_util", + ], +) diff --git a/devtools/bundled_program/serialize/test/TARGETS b/devtools/bundled_program/serialize/test/TARGETS deleted file mode 100644 index 4c6bfbe3d5e..00000000000 --- a/devtools/bundled_program/serialize/test/TARGETS +++ /dev/null @@ -1,15 +0,0 @@ -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "serialize", - srcs = [ - "test_serialize.py", - ], - deps = [ - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/devtools/bundled_program/util:test_util", - ], -) diff --git a/devtools/bundled_program/test/BUCK b/devtools/bundled_program/test/BUCK index 213d4c228d1..7809f382bb5 100644 --- a/devtools/bundled_program/test/BUCK +++ b/devtools/bundled_program/test/BUCK @@ -1,4 +1,70 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # add this empty BUCK file to unblock landing. Without this, we get land error: # "No build file at xplat/executorch/exir/tests/BUCK when resolving target fbsource//xplat/executorch/exir/tests:." -oncall("executorch") + +# !!!! fbcode/executorch/devtools/bundled_program/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# @noautodeps + +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") + + +fbcode_target(_kind = python_unittest, + name = "bundle_data", + srcs = [ + "test_bundle_data.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/exir/_serialize:lib", + ], +) + +fbcode_target(_kind = python_unittest, + name = "config", + srcs = [ + "test_config.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/extension/pytree:pylib", + ], +) + +fbcode_target(_kind = python_unittest, + name = "end2end", + srcs = [ + "test_end2end.py", + ], + deps = [ + "//caffe2:torch", + "//executorch/devtools/bundled_program:config", + "//executorch/devtools/bundled_program:core", + "//executorch/devtools/bundled_program/serialize:lib", + "//executorch/devtools/bundled_program/util:test_util", + "//executorch/exir:dynamic_shape", + "//executorch/exir:lib", + "//executorch/exir:memory", + "//executorch/exir:pass_manager", + "//executorch/exir:print_program", + "//executorch/exir:tensor", + "//executorch/exir/_serialize:lib", + "//executorch/exir/emit:lib", + "//executorch/exir/passes:lib", + "//executorch/exir/tests:control_flow_models", + "//executorch/exir/tests:dynamic_shape_models", + "//executorch/exir/tests:models", + "//executorch/exir/tests:transformer", + "//executorch/extension/pybindings:portable_lib", + "//executorch/extension/pytree:pybindings", + "//executorch/kernels/portable:custom_ops_generated_lib", + ], +) diff --git a/devtools/bundled_program/test/TARGETS b/devtools/bundled_program/test/TARGETS deleted file mode 100644 index 652c74b8f43..00000000000 --- a/devtools/bundled_program/test/TARGETS +++ /dev/null @@ -1,63 +0,0 @@ -# @noautodeps - -load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") - -oncall("executorch") - -python_unittest( - name = "bundle_data", - srcs = [ - "test_bundle_data.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/schema:bundled_program_schema_py", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/exir/_serialize:lib", - ], -) - -python_unittest( - name = "config", - srcs = [ - "test_config.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/extension/pytree:pylib", - ], -) - -python_unittest( - name = "end2end", - srcs = [ - "test_end2end.py", - ], - deps = [ - "//caffe2:torch", - "//executorch/devtools/bundled_program:config", - "//executorch/devtools/bundled_program:core", - "//executorch/devtools/bundled_program/serialize:lib", - "//executorch/devtools/bundled_program/util:test_util", - "//executorch/exir:dynamic_shape", - "//executorch/exir:lib", - "//executorch/exir:memory", - "//executorch/exir:pass_manager", - "//executorch/exir:print_program", - "//executorch/exir:tensor", - "//executorch/exir/_serialize:lib", - "//executorch/exir/emit:lib", - "//executorch/exir/passes:lib", - "//executorch/exir/tests:control_flow_models", - "//executorch/exir/tests:dynamic_shape_models", - "//executorch/exir/tests:models", - "//executorch/exir/tests:transformer", - "//executorch/extension/pybindings:portable_lib", - "//executorch/extension/pytree:pybindings", - "//executorch/kernels/portable:custom_ops_generated_lib", - ], -)