Given a file name, I would like to determine all *_test rules which depend on that file.
Is there any way to query this information from Bazel, either through bazel query or through some other means?
Given a file name, I would like to determine all *_test rules which depend on that file.
Is there any way to query this information from Bazel, either through bazel query or through some other means?
Copyright © 2021 Jogjafile Inc.
bazel query 'rdeps(tests(//...), //build_tests:gflags.cc)'.tests(//...)gives you all the*_testrules, andrdepsgives you reverse dependencies of its second argument within the first argument.