Skip to content

Commit 2303947

Browse files
authored
Unbreak unittest-buck (#9315)
Fixed a couple clear OSS build problems, but ran into blockers (supported_features doesn't work in OSS buck), so just dropping prim_ops_test_cpp from OSS unittest-buck.
1 parent 3eb4627 commit 2303947

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.ci/scripts/unittest-buck2.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ set -eux
88

99
# TODO: expand this to //...
1010
# TODO: can't query cadence & vulkan backends
11-
# TODO: can't query //kernels/prim_ops because of a cpp_unittest and
12-
# broken code in shim to read oss.folly_cxx_tests. Sending fix but it
13-
# needs to propagate and we need a submodule update.
11+
# TODO: can't query //kernels/prim_ops because of non-buckified stuff in OSS.
1412
buck2 query "//backends/apple/... + //backends/example/... + \
1513
//backends/mediatek/... + //backends/test/... + //backends/transforms/... + \
1614
//backends/xnnpack/... + //configurations/... + //kernels/aten/... + \
@@ -20,7 +18,9 @@ buck2 query "//backends/apple/... + //backends/example/... + \
2018
UNBUILDABLE_OPTIMIZED_OPS_REGEX="gelu|fft_r2c|log_softmax"
2119
BUILDABLE_OPTIMIZED_OPS=$(buck2 query //kernels/optimized/cpu/... | grep -E -v $UNBUILDABLE_OPTIMIZED_OPS_REGEX)
2220

23-
BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -v prim_ops_test_py)
21+
# TODO: build prim_ops_test_cpp again once supported_features works in
22+
# OSS buck.
23+
BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -v prim_ops_test)
2424
# TODO: expand the covered scope of Buck targets.
2525
# //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH.
2626
# //runtime/test/... requires Python torch, which we don't have in our OSS buck setup.

kernels/test/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def define_common_targets():
3737
],
3838
fbcode_exported_deps = [
3939
"//common/gtest:gtest",
40-
],
40+
] if not runtime.is_oss else [],
4141
xplat_exported_deps = [
4242
"//third-party/googletest:gtest_main",
4343
],
@@ -68,7 +68,7 @@ def define_common_targets():
6868
fbcode_exported_deps = [
6969
"//common/init:init",
7070
"//common/gtest:gtest",
71-
],
71+
] if not runtime.is_oss else [],
7272
xplat_exported_deps = [
7373
"//xplat/folly:init_init",
7474
"//third-party/googletest:gtest_main",

0 commit comments

Comments
 (0)