Implement gensrcs rule to migrate gensrcs module type to Bazel
The CL introduces unittest.bzl test framework from Skylib. The tests
check the analysis-time behavior of the rule. Based on
https://bazel.build/rules/testing, these analysis tests are currently
the best option for testing the rule implementation.
This kind of test doesn't exist yet in AOSP. I think they are
useful and simple to write/adopt. We can use this CL as a starting point to adopt Skylib's unittest.bzl into testing our custom rules.
Test: b test //build/bazel/tests/rules/gensrcs/...
Bug: 179452413
Change-Id: I9f2f4395305828565e726833bd7cc5032f765c6a
5 files changed