Search code examples
bazelbazel-rules

bazel query to find all test targets and test


Team, I want to find all test targets and run them.

I tried

./bazel test $(./bazel query //...) -//src/ui/...

output: ./bazel: Argument list too long

any hint what i could be doing wrong?


Solution

  • bazel test //... --build_tests_only -- -//src/ui/... should work. There's no need for bazel query based on the scope of your question.