diff --git a/.ci/scripts/unittest-buck2.sh b/.ci/scripts/unittest-buck2.sh index e78e682faac..9c4c4608694 100755 --- a/.ci/scripts/unittest-buck2.sh +++ b/.ci/scripts/unittest-buck2.sh @@ -45,6 +45,14 @@ done # Build only without testing buck2 build //codegen/tools/... \ + //exir/_serialize/test/... \ + //exir/backend/test:test_delegate_map_builder \ + //exir/backend/test:test_graph_partition \ + //exir/backend/test:test_group_partitioner \ + //exir/backend/test:test_passes \ + //exir/dialects/backend/test/... \ + //exir/dialects/edge/op/... \ + //exir/operator/... \ //extension/llm/runner/io_manager:io_manager \ //extension/llm/modules/... \ //extension/llm/runner:multimodal_runner_lib \ diff --git a/exir/_serialize/test/BUCK b/exir/_serialize/test/BUCK index c70a3629cd1..f9d5fcc9f9a 100644 --- a/exir/_serialize/test/BUCK +++ b/exir/_serialize/test/BUCK @@ -1,9 +1,10 @@ load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_program", srcs = [ "test_program.py", @@ -15,7 +16,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_flatbuffer", srcs = [ "test_flatbuffer.py", @@ -25,7 +26,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_cord", srcs = [ "test_cord.py", @@ -35,7 +36,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_named_data_store", srcs = [ "test_named_data_store.py", @@ -45,7 +46,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_serialize", srcs = [ "test_serialize.py", diff --git a/exir/backend/test/BUCK b/exir/backend/test/BUCK index 1212880068a..22d5f0b56ba 100644 --- a/exir/backend/test/BUCK +++ b/exir/backend/test/BUCK @@ -67,7 +67,7 @@ fbcode_target(_kind = runtime.python_library, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_backend_with_named_data_map", srcs = [ "test_backend_with_named_data_map.py", @@ -158,7 +158,7 @@ fbcode_target(_kind = runtime.python_library, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_backends", srcs = [ "test_backends.py", @@ -190,7 +190,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_to_backend_multi_method", srcs = [ "test_to_backend_multi_method.py", @@ -243,7 +243,7 @@ fbcode_target(_kind = runtime.python_library, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_debug_handle_map", srcs = [ "test_debug_handle_map.py", @@ -260,7 +260,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_backends_lifted", srcs = [ "test_backends_lifted.py", @@ -292,7 +292,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_lowered_backend_module", srcs = [ "test_lowered_backend_module.py", @@ -317,7 +317,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_graph_partition", srcs = [ "test_graph_partition.py", @@ -334,7 +334,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_backends_nested", srcs = [ "test_backends_nested.py", @@ -360,7 +360,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_delegate_map_builder", srcs = [ "test_delegate_map_builder.py", @@ -374,7 +374,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_utils", srcs = [ "test_utils.py", @@ -392,7 +392,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_partitioner", srcs = [ "test_partitioner.py", @@ -418,7 +418,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_passes", srcs = [ "test_passes.py", @@ -430,7 +430,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_compatibility", srcs = [ "test_compatibility.py", @@ -449,7 +449,7 @@ fbcode_target(_kind = python_unittest, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_group_partitioner", srcs = [ "test_group_partitioner.py", diff --git a/exir/dialects/backend/test/BUCK b/exir/dialects/backend/test/BUCK index 1a79a6aa692..cb8eae2ddff 100644 --- a/exir/dialects/backend/test/BUCK +++ b/exir/dialects/backend/test/BUCK @@ -1,9 +1,10 @@ load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_backend_ops", srcs = [ "test_backend_ops.py", diff --git a/exir/dialects/edge/op/BUCK b/exir/dialects/edge/op/BUCK index 0fb7051bd76..ec28e78c016 100644 --- a/exir/dialects/edge/op/BUCK +++ b/exir/dialects/edge/op/BUCK @@ -18,7 +18,7 @@ fbcode_target(_kind = runtime.python_library, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_api", srcs = [ "test/test_api.py", diff --git a/exir/emit/test/BUCK b/exir/emit/test/BUCK index 71a9619a0bc..8051aad7869 100644 --- a/exir/emit/test/BUCK +++ b/exir/emit/test/BUCK @@ -1,4 +1,7 @@ load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") + 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:." @@ -6,10 +9,8 @@ oncall("executorch") # !!!! fbcode/executorch/exir/emit/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, +fbcode_target(_kind = runtime.python_test, # @autodeps-skip pybindings don't work well with autodeps name = "emit", srcs = [ diff --git a/exir/operator/BUCK b/exir/operator/BUCK index 0a3aa845fc2..238155ce054 100644 --- a/exir/operator/BUCK +++ b/exir/operator/BUCK @@ -38,7 +38,7 @@ fbcode_target(_kind = runtime.python_library, ], ) -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, name = "test_operator", srcs = [ "test/test_operator.py", diff --git a/exir/program/test/BUCK b/exir/program/test/BUCK index e57eb729859..f316eb83f6a 100644 --- a/exir/program/test/BUCK +++ b/exir/program/test/BUCK @@ -1,9 +1,10 @@ load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest") +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") oncall("executorch") -fbcode_target(_kind = python_unittest, +fbcode_target(_kind = runtime.python_test, # @autodeps-skip pybindings don't work well with autodeps name = "test_program", srcs = [ diff --git a/exir/tests/TARGETS b/exir/tests/TARGETS index 017a133b587..63e41daec42 100644 --- a/exir/tests/TARGETS +++ b/exir/tests/TARGETS @@ -67,7 +67,7 @@ runtime.python_library( ], ) -python_unittest( +runtime.python_test( name = "tracer", srcs = [ "test_tracer.py", @@ -176,7 +176,7 @@ python_unittest( ], ) -python_unittest( +runtime.python_test( name = "memory_planning", srcs = [ "test_memory_planning.py", @@ -335,7 +335,7 @@ python_unittest( ], ) -python_unittest( +runtime.python_test( name = "capture", srcs = [ "test_capture.py", diff --git a/shim_et/xplat/executorch/build/env_interface.bzl b/shim_et/xplat/executorch/build/env_interface.bzl index 98a031bb604..adf001ac33f 100644 --- a/shim_et/xplat/executorch/build/env_interface.bzl +++ b/shim_et/xplat/executorch/build/env_interface.bzl @@ -142,6 +142,7 @@ def _remove_unsupported_kwargs(kwargs): kwargs.pop("types", None) # will have to find a different way to handle .pyi files in oss kwargs.pop("resources", None) # doesn't support resources in python_library/python_binary yet kwargs.pop("feature", None) # internal-only, used for Product-Feature Hierarchy (PFH) + kwargs.pop("supports_static_listing", None) # fbcode-only python_test kwarg return kwargs def _patch_headers(kwargs):