Skip to content

Commit

Permalink
build(bazel): provide means of excluding whl_test locally (#2940)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rkuester authored Nov 27, 2024
1 parent e2cc052 commit 31b5246
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ build:ubsan --copt -O3
build:ubsan --copt -fno-omit-frame-pointer
build:ubsan --linkopt -fsanitize=undefined
build:ubsan --linkopt -lubsan

# Hooks for defining local configuration
try-import ../bazelrc.local
try-import bazelrc.local
1 change: 1 addition & 0 deletions python/tflite_micro/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ py_wheel(

sh_test(
name = "whl_test",
size = "large",
srcs = [
"whl_test.sh",
],
Expand Down

0 comments on commit 31b5246

Please sign in to comment.