Skip to content

Commit 8e255ac

Browse files
bigfootjonmeta-codesync[bot]
authored andcommitted
migrate runtime/test (with PACKAGE gating) (#21433)
Summary: Pull Request resolved: #21433 The dir's PACKAGE file uses ci.buckconfig("executorch.event_tracer_enabled") which is not on xplat's buckconfig allowlist. Wrapped the ci.package call in `is_fbcode() else None` so xplat skips it (the dir is fbcode-only anyway since it was TARGETS-only pre-migration). Then applied the standard chunk-6 transform: created targets.bzl with define_common_targets(is_fbcode = False) early-returning outside fbcode, replaced TARGETS with thin BUCK. Reviewed By: ndmitchell Differential Revision: D109081975
1 parent e3571c2 commit 8e255ac

3 files changed

Lines changed: 45 additions & 34 deletions

File tree

runtime/test/BUCK

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Any targets that should be shared between fbcode and xplat must be defined in
2+
# targets.bzl.
3+
4+
load("@fbsource//tools/build_defs:fbsource_utils.bzl", "is_fbcode")
5+
load(":targets.bzl", "define_common_targets")
6+
7+
oncall("executorch")
8+
9+
define_common_targets(is_fbcode = is_fbcode())

runtime/test/TARGETS

Lines changed: 0 additions & 34 deletions
This file was deleted.

runtime/test/targets.bzl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
3+
def define_common_targets(is_fbcode = False):
4+
if not is_fbcode:
5+
return
6+
7+
runtime.python_test(
8+
name = "test_runtime",
9+
srcs = ["test_runtime.py"],
10+
deps = [
11+
"//executorch/extension/pybindings/test:make_test",
12+
"//executorch/runtime:runtime",
13+
"//executorch/devtools/etdump:serialize",
14+
],
15+
)
16+
17+
runtime.python_test(
18+
name = "test_runtime_etdump_gen",
19+
srcs = ["test_runtime_etdump_gen.py"],
20+
deps = [
21+
"//executorch/extension/pybindings/test:make_test",
22+
"//executorch/runtime:runtime",
23+
"//executorch/devtools/etdump:serialize",
24+
],
25+
)
26+
27+
runtime.python_test(
28+
name = "test_runtime_xnnpack",
29+
srcs = ["test_runtime_xnnpack.py"],
30+
deps = [
31+
"//caffe2:torch",
32+
"//executorch/backends/xnnpack/partition:xnnpack_partitioner",
33+
"//executorch/exir:lib",
34+
"//executorch/runtime:runtime",
35+
],
36+
)

0 commit comments

Comments
 (0)