Commit graph

8 commits

Author SHA1 Message Date
Cole Faust
a57c8c29bb Improve genrule sandboxing script
Do the sandboxed and non-sandboxed builds in two separate directories.
This allows us to keep the directories around so you can compare diffs
afterwards, and allows us to run the builds in parallel. It also means
that analysis isn't rerun twice every time you run the script.

Bug: 307824623
Test: Using it for the past few genrules I've fixed
Change-Id: Ib3be394f233b383c1bba41d31ada6c9af94e755b
2023-11-15 11:44:12 -08:00
Cole Faust
33d7169928 Revert "Revert "Add GENRULE_SANDBOXING=false to non-sandboxed bu..."
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
2023-10-18 22:50:26 +00:00
Mateusz Cicheński
f119ceb1b2 Revert "Add GENRULE_SANDBOXING=false to non-sandboxed builds"
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
2023-10-17 17:35:52 +00:00
Cole Faust
b36e79c72c Add GENRULE_SANDBOXING=false to non-sandboxed builds
Because sandboxing is becoming the default.

Bug: 290816499
Test: Presubmits
Change-Id: Icd8cb70f0275bafc580c7123a9d38991ac58adbf
2023-10-11 14:52:08 -07:00
Cole Faust
bbe2cc6191 Cleanup genrule_sandbox_test.py
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
2023-07-12 18:01:32 -07:00
Jason Macnak
394f1b7b86 Fix local var error, warn if no outputs, handle "}generate{"
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
2023-06-15 10:59:20 -07:00
Liz Kammer
2fb361cfb8 Add feature to print output paths for module
Test: ./genrule_sandbox_test.py -o gen_fstab.gs201 \
    libbt_topshim_bridge_header \
    android-support-multidex-instrumentation-version
Change-Id: Ied74d727054a1bc3b447c1f10a4ee41b3fdfdf1d
2023-06-09 11:31:28 -04:00
Liz Kammer
767fad4b05 Make genrule sandbox script a python script
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
2023-06-09 11:31:08 -04:00