I have used gflags in my test to define custom flags. How can I pass such a flag to my test while running the test via bazel test
command?
For example: I can run a test multiple times using:
bazel test //xyz:my_test --runs_per_test 10
In the same command I would like to pass a flag defined in my_test
say --use_xxx
, how do I do so?
bazel run
you can leverage the fact that everything to the right of a lone--
would get interpreted as arguments to pass down to the process while for build and run commands that blocked off section functions as target patterns as inbazel [<startup options>] <command> [<args>] -- [<target patterns>]
– Buckskins