Skip to content

Commit 5d1aac9

Browse files
committed
Try testing in OSS
1 parent c9f46e2 commit 5d1aac9

File tree

4 files changed

+46
-40
lines changed

4 files changed

+46
-40
lines changed

codegen/tools/targets.bzl

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -196,27 +196,27 @@ def define_common_targets(is_fbcode = False):
196196
_is_external_target = True,
197197
)
198198

199-
if not runtime.is_oss:
200-
runtime.cxx_python_extension(
201-
name = "selective_build",
202-
srcs = [
203-
"selective_build.cpp",
204-
],
205-
base_module = "executorch.codegen.tools",
206-
types = ["selective_build.pyi"],
207-
preprocessor_flags = [
208-
"-DEXECUTORCH_PYTHON_MODULE_NAME=selective_build",
209-
],
210-
deps = [
211-
"//executorch/runtime/core:core",
212-
"//executorch/schema:program",
213-
],
214-
external_deps = [
215-
"pybind11",
216-
],
217-
use_static_deps = True,
218-
visibility = ["//executorch/codegen/..."],
219-
)
199+
200+
runtime.cxx_python_extension(
201+
name = "selective_build",
202+
srcs = [
203+
"selective_build.cpp",
204+
],
205+
base_module = "executorch.codegen.tools",
206+
types = ["selective_build.pyi"],
207+
preprocessor_flags = [
208+
"-DEXECUTORCH_PYTHON_MODULE_NAME=selective_build",
209+
],
210+
deps = [
211+
"//executorch/runtime/core:core",
212+
"//executorch/schema:program",
213+
],
214+
external_deps = [
215+
"pybind11",
216+
],
217+
use_static_deps = True,
218+
visibility = ["//executorch/codegen/..."],
219+
)
220220

221221

222222
# TODO(larryliu0820): This is a hack to only run these two on fbcode. These targets depends on exir which is only available in fbcode.
@@ -255,20 +255,20 @@ def define_common_targets(is_fbcode = False):
255255
],
256256
)
257257

258-
runtime.python_test(
259-
name = "test_selective_build",
260-
srcs = [
261-
"test/test_selective_build.py",
262-
],
263-
package_style = "inplace",
264-
visibility = [
265-
"PUBLIC",
266-
],
267-
deps = [
268-
":selective_build",
269-
"fbsource//third-party/pypi/expecttest:expecttest",
270-
"//caffe2:torch",
271-
"//executorch/exir:lib",
272-
],
273-
_is_external_target = True,
274-
)
258+
runtime.python_test(
259+
name = "test_selective_build",
260+
srcs = [
261+
"test/test_selective_build.py",
262+
],
263+
package_style = "inplace",
264+
visibility = [
265+
"PUBLIC",
266+
],
267+
deps = [
268+
":selective_build",
269+
"fbsource//third-party/pypi/expecttest:expecttest",
270+
"//caffe2:torch",
271+
"//executorch/exir:lib",
272+
],
273+
_is_external_target = True,
274+
)

extension/pytree/TARGETS

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ runtime.cxx_python_extension(
1515
],
1616
base_module = "executorch.extension.pytree",
1717
deps = [
18-
"fbsource//third-party/pybind11:pybind11",
1918
":pytree",
2019
],
20+
external_deps = [
21+
"pybind11",
22+
],
2123
)
2224

2325
runtime.cxx_python_extension(
@@ -27,9 +29,11 @@ runtime.cxx_python_extension(
2729
],
2830
base_module = "executorch.extension.pytree",
2931
deps = [
30-
"fbsource//third-party/pybind11:pybind11",
3132
":pytree",
3233
],
34+
external_deps = [
35+
"pybind11",
36+
],
3337
)
3438

3539
runtime.python_library(

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ addopts =
3131

3232
# codegen
3333
codegen/test
34+
codegen/tools
3435

3536
# devtools
3637
devtools/

shim_et/xplat/executorch/build/runtime_wrapper.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def _python_binary(*args, **kwargs):
346346

347347
def _python_test(*args, **kwargs):
348348
_patch_kwargs_common(kwargs)
349+
_remove_caffe2_deps(kwargs)
349350
env.python_test(*args, **kwargs)
350351

351352
def get_oss_build_kwargs():

0 commit comments

Comments
 (0)