I'm not very familiar with Bazel, other than having to add or remove a few things from BUILD here and there and knowing how to execute the tests in a certain directory.
I'm currently working in a code base that has unit tests scattered throughout subdirectories, but they're all within that subdirectory's BUILD. Is there a way to kick off all the tests?
You can run all tests via:
bazel test //...
Maybe you need some config to run your test (see .bazelrc)
bazel --config=my_config //...
Similar you can build your complete workspace via:
bazel build //...
Having a look at the "Building multiple targets" section in the Bazel target reference. In particular, you are likely looking for invocations like bazel test //subdir:all or bazel test //subdir/....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With