Revert submission 2794133-revert-2782270-genrule_sandboxing_by_default-JMQJWWORHR
Reason for revert: Reapplying now that ag/25093969 and ag/25107100 are in
Reverted changes: /q/submissionid:2794133-revert-2782270-genrule_sandboxing_by_default-JMQJWWORHR
Change-Id: Ibb7dd6a0f925d043ab8df2f79cbcb9d30c3be458
Revert submission 2782270-genrule_sandboxing_by_default
Reason for revert: Potential culprit for b/305851039 and many other build breakages - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Reverted changes: /q/submissionid:2782270-genrule_sandboxing_by_default
Change-Id: I7b47a92e1b315add65c8018500d9ffbd58f8f1dd
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