In preparation for adding the ability to check all genrules in the tree.
Bug: 290816499
Test: ./build/soong/tests/genrule_sandbox_test.py extensions_db.pb
Change-Id: I6454be7e88a876a2ab1105c04f5ecda03ecd7771
1. UnboundLocalError: cannot access local variable 'output' where
it is not associated with a value
2. `build/soong/tests/genrule_sandbox_test.py WmediumdServerProto_cc`
would try to build the entire world due to 3)
3. WmediumdServerProto_cc 's module action desc had '}generate{'
without a space which would cause 2)
Bug: b/287470077
Test: build/soong/tests/genrule_sandbox_test.py WmediumdServerProto_cc
Change-Id: Ie9d5db44195a6f700cc876ec889bd01c11e66cff
Unfortunately, genrules are not always available with `m`, instead we
need to know their output paths in order to build them and diff them.
Rewriting in Python lets us store module:output path maps more easily.
Test: ./genrule_sandbox_test.py gen_fstab.gs201 \
libbt_topshim_bridge_header \
android-support-multidex-instrumentation-version
Change-Id: If74130e5a4381cc0e1fab396ebb90dfd5a595a1c