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
tree: 126733732cfe734c51481f67da807cef18b94839
  1. ci/
  2. docs/
  3. examples/
  4. json_module_graph/
  5. mk2rbc/
  6. platforms/
  7. product_variables/
  8. rules/
  9. rules_cc/
  10. scripts/
  11. tests/
  12. vendor/
  13. bazel.BUILD
  14. bazel.sh
  15. bazel.WORKSPACE
  16. common.bazelrc
  17. darwin.bazelrc
  18. linux.bazelrc
  19. OWNERS
  20. README.md
README.md

Bazel

The code in this directory is experimental. Bazel support for Android Platform is undergoing active development and workflow stability is currently not guaranteed.