Skip to content

Commit 31b5246

Browse files
authored
build(bazel): provide means of excluding whl_test locally (#2940)
Mark whl_test as size "large", so that it, and other tests of a similar size, can be excluded with the --test_size_filters option. For even more convenience, provide a hook for developers to add local .bazlerc-style defaults and configurations in $root/bazelrc.local and ../$root/bazelrc.local. This gives a convenient means of explicitly excluding whl_test during local, incremental development runs of `bazel test ...`, while not surprising users who don't opt in, and without affecting CI. whl_test's cached result is invalidated, and the test rerun, following most git activity, because the git hash appears in the Python package's version number. This combined with its long runtime and network dependency makes it a nuisance when running `bazel test ...` incrementally during development. Of course, this test be run when developing changes that affect the package, before pushing commits to main, and in CI. BUG=see description
1 parent e2cc052 commit 31b5246

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@ build:ubsan --copt -O3
8080
build:ubsan --copt -fno-omit-frame-pointer
8181
build:ubsan --linkopt -fsanitize=undefined
8282
build:ubsan --linkopt -lubsan
83+
84+
# Hooks for defining local configuration
85+
try-import ../bazelrc.local
86+
try-import bazelrc.local

python/tflite_micro/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ py_wheel(
241241

242242
sh_test(
243243
name = "whl_test",
244+
size = "large",
244245
srcs = [
245246
"whl_test.sh",
246247
],

0 commit comments

Comments
 (0)