I have a py_binary rule like this:
py_binary(
name = "testInputs",
srcs = ["testInputs.py"],
)
and a cc_test like this:
cc_test(
name = "test",
src = ["test.cc"],
data = [":testInputs"],
)
test.cc needs an input file next to it (say input.txt) that is generated by testInputs.py.
I want testInputs to get run and provide the input file to the test.
As mentioned here, I tried to to depend on testInputs in the data section. But the test doesn't find the input file nearby.
Result of tree bazel-out | grep -F input.txt shows that even testInput rule has not run at all - since input.txt file not exists at all.