Commit graph

345 commits

Author SHA1 Message Date
Cole Faust
e762b94fe7 Remove SandboxingDenyPathList
It's no longer used.

Bug: 307824623
Test: m nothing --no-skip-soong-tests
Change-Id: I181de9d852f4025c6c5829cc4941ffb705f7cb50
2024-03-15 19:50:03 +00:00
Cole Faust
5549257422 Remove depfile support from genrules
All usages of it have been removed.

Bug: 307824623
Test: Presubmits
Change-Id: I9502b328a5aaa6840653f46011ca6bd05f3cba99
2024-01-25 18:05:18 -08:00
Cole Faust
4cb1155368 Denylist com.google.pixel.camera.hal.manifest
This is an internal-only genrule, that was previously included in
a denylist in vendor/google/build. However, not all partners have
that file, so some products ended up setting
BUILD_BROKEN_GENRULE_SANDBOXING when that file didn't exist. Moving
it to the aosp allowlist lets us remove those build broken flags.

I checked with krzysio@ and yromanenko@ and they're ok with putting
this name in aosp.

Bug: 307824623
Test: Presubmits
Change-Id: Ia3f24a5c8c8efc62bdc84435343cafd1dac9afed
2024-01-12 16:23:56 -08:00
LaMont Jones
afe7baf47d Propagate aconfig providers for more modules.
Bug: 308625757
Test: manual
Change-Id: Iaf6d45a4259f1c6c34476c34c431344283ae2830
2024-01-10 14:03:30 +00:00
Cole Faust
9734cff08c Merge "Sandbox chre_atoms_log.h" into main 2023-12-20 18:43:12 +00:00
Cole Faust
30e32f67fc Merge changes I8b352305,Iadf9e324 into main
* changes:
  Sandbox CtsApkVerityTestDebugFiles
  Include "soong" in sandboxed out paths
2023-12-20 01:35:40 +00:00
Cole Faust
81f2ac35f1 Sandbox CtsApkVerityTestDebugFiles
go/android-busy-beavers-sandboxing

It still has a diff in the generule_sandbox_test, but it's just the
addition of "./" in front of all the paths, which is fine.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py CtsApkVerityTestDebugFiles
Change-Id: I8b352305cfb339bc5a09a2305e10a187723d754d
2023-12-19 15:35:02 -08:00
Cole Faust
afc3e38658 Sandbox chre_atoms_log.h
go/android-busy-beavers-sandboxing

Bug: 307824623
Test: m chre_atoms_log.h
Change-Id: I3b4fcf6365e5571484964a4f9f344ed26f8f9afd
2023-12-18 15:02:38 -08:00
Colin Cross
51428c451a Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main
* changes:
  Convert ModuleProvder to generic providers API
  Convert OtherModuleProvider to generic providers API
  Convert Provider to generic providers API
  Convert SetProvider to generic providers API
2023-12-18 22:43:45 +00:00
Colin Cross
402130276c Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.

Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
2023-12-14 16:12:20 -08:00
Cole Faust
776146b3f4 Sandbox camera-its
It was fixed with aosp/2866315.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py camera-its
Change-Id: Iaf3871682e99ceb7161c159acb757ce2949f5b3d
2023-12-13 15:15:26 -08:00
Cole Faust
27609f15ff Update wording on depfile property error
Bug: 307824623
Test: Presubmits
Change-Id: I25919150d2ee2483099e7cb710330dc259d57e66
2023-12-12 18:10:36 -08:00
Colin Cross
a72573a727 Merge "Remove ConvertWithBp2build implementations" into main 2023-12-11 23:12:53 +00:00
Colin Cross
8ff105860d Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-12-08 13:51:05 -08:00
Cole Faust
bcfc299575 Remove art/test from genrule allowlist
go/android-busy-beavers-sandboxing

Bug: 307824623
Test: mm in art/test
Change-Id: Ic37343ad873f71461db984b030f6beda5279207c
2023-12-08 10:57:27 -08:00
Cole Faust
ce74a59bb2 individually escape results of $(locations)
proptools.ShellEscape escapes mostly by surrounding the string in
quotes. This makes all the files from a $(locations) be passed as
one shell argument if escaping was needed. Escape them individually
so that they're still passed as separate arguments.

Bug: 307824623
Test: running art tests with aosp/2860435
Change-Id: I9940941f4a7bb4d29d9388e4d57f8cbd732b6d32
2023-12-08 10:53:59 -08:00
Aditya Choudhary
4c3e2df157 Merge changes from topic "code_metadata" into main
* changes:
  Add source file provider for genrule/srcs, python libraries and rust libraries.
  Add Code Metadata rule to soong/testing.
2023-12-06 07:37:50 +00:00
Aditya Choudhary
26df39fe44 Add source file provider for genrule/srcs, python libraries and rust libraries.
Change-Id: I2d7d4684a10c15aeecc27b8db800ab27a807d2e2
2023-12-05 19:56:26 +00:00
Hugo Drumond Jacob
afadb164fd Revert "Sandbox chre_atoms_log.h and deqp_spvtools_update_build_version"
This reverts commit 12dcc8649e.

Reason for revert: See b/314904106

Bug: 314904106
Change-Id: Icb048d86a66a5f0492c3ae017314f4cdcd3ffabe
2023-12-05 17:49:50 +00:00
Colin Cross
2998c33d43 Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main 2023-12-05 00:29:10 +00:00
Colin Cross
f61d03d241 Add TestContext parameter to ContentFromFileRuleForTests
The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config.  Add it and update all the tests that use it in order
to simply review of the next CL.

Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
2023-12-03 17:22:56 -08:00
Cole Faust
b5bfebf19b Sandbox libcore-non-cts-tests-txt
Bug: 307824623
Test: m sandbox_libcore-non-cts-tests-txt and diffed the files before/after
Change-Id: If564e438d1e886419e435e24f52e0f0e2ec479d2
2023-11-30 14:53:21 -08:00
Cole Faust
e6698b06c3 Sandbox swiftshader_spvtools_update_build_version
Sandboxing produces this diff:
  1c1
  < "v2023.2", "SPIRV-Tools v2023.2 android-u-beta-1-gpl-587-g9d167f845"
  ---
  > "v2023.2", "SPIRV-Tools v2023.2 unknown hash, 2023-11-30T17:54:23"

But the git repository is already not garunteed to exist on CI, and
the genrule is consequently commented with a FIXME about that.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py swiftshader_spvtools_update_build_version
Change-Id: I98e65781bd49137662ed020927940b0f3e4d645b
2023-11-30 09:55:20 -08:00
Treehugger Robot
3766553866 Merge "Sandbox vm-tests-tf-lib" into main 2023-11-30 13:53:46 +00:00
Cole Faust
141314e11a Sandbox aidl-golden-test-build-hook-gen
Bug: 307824623
Test: m aidl-golden-test-build-hook-gen
Change-Id: I71ebe9d16702be15a8dc98b10dedf685114daed8
2023-11-29 17:47:12 -08:00
Treehugger Robot
7d7d94ffd2 Merge "Sandbox chre_atoms_log.h and deqp_spvtools_update_build_version" into main 2023-11-29 18:36:10 +00:00
Treehugger Robot
0fd71d0232 Merge "Sandbox seller-frontend-service-stub-lite" into main 2023-11-29 14:20:24 +00:00
Treehugger Robot
5ca7b8ed22 Merge "Sandbox ScriptGroupTest-rscript" into main 2023-11-28 22:19:57 +00:00
Cole Faust
12dcc8649e Sandbox chre_atoms_log.h and deqp_spvtools_update_build_version
go/roboleaf-busy-beavers-sandboxing

deqp_spvtools_update_build_version gets this diff:
  < "v2022.4-dev", "SPIRV-Tools v2022.4-dev android-u-beta-1-gpl-177-g1ef94532"
  ---
  > "v2022.4-dev", "SPIRV-Tools v2022.4-dev unknown hash, 2023-11-28T19:30:48"

But it already has a comment on it to revisit its usage of git,
which doesn't work on CI.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py chre_atoms_log.h deqp_spvtools_update_build_version
Change-Id: I759970a5687c4f75116a40f5c127ae762da4ee95
2023-11-28 12:39:09 -08:00
Cole Faust
28ac433d3e Sandbox vm-tests-tf-lib
go/roboleaf-busy-beavers-sandboxing

This genrule is non-deterministic, (the jar files have timestamps)
so genrule_sandbox_test.py fails, but should otherwise work with
sandboxing.

Bug: 307824623
Test: m vm-tests-tf-lib
Change-Id: Ia8c60e7a0f134e839939622fd2747ff73ea3ce3c
2023-11-28 11:23:31 -08:00
Cole Faust
38969102dd Merge "Sandbox cronet genrules" into main 2023-11-28 18:30:40 +00:00
Cole Faust
122767d27c Merge "Sandbox apexd test genrules" into main 2023-11-28 17:58:28 +00:00
Treehugger Robot
a4291d572a Merge "Sandbox checkIn-service-stub-lite" into main 2023-11-28 02:21:56 +00:00
Cole Faust
9de49502af Sandbox checkIn-service-stub-lite
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py checkIn-service-stub-lite
Change-Id: If64ca165eed121b536f566a4fc36c9e6597784fd
2023-11-27 17:31:13 -08:00
Cole Faust
44850e04ae Sandbox ScriptGroupTest-rscript
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py ScriptGroupTest-rscript
Change-Id: I335634c0a0a74d35967f540070112888758ae0ca
2023-11-27 15:15:44 -08:00
Cole Faust
fc1e0cec4c Sandbox ue_unittest_erofs_imgs
This already works with sandboxing, I'm not sure why it was added.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py ue_unittest_erofs_imgs
Change-Id: I8d2c151e3bc6ed87e1d147e0ae316397ad56c4c8
2023-11-27 14:55:06 -08:00
Cole Faust
2769238611 Sandbox seller-frontend-service-stub-lite
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py seller-frontend-service-stub-lite
Change-Id: Ibb68124b613cc6b43fcacdfb8447d25d8577945b
2023-11-27 14:32:46 -08:00
Cole Faust
962ee8be34 Sandbox apexd test genrules
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py gen_corrupt_rebootless_apex gen_key_mismatch_capex
Change-Id: I558f0b856f80bfebbb9b68b8c95c587d4e13ac84
2023-11-27 14:11:05 -08:00
Treehugger Robot
ae4cad3cda Merge "Sandbox libc_musl_sysroot_bits" into main 2023-11-27 21:32:58 +00:00
Cole Faust
c115217249 Sandbox pvmfw_fdt_template_rs
This already works with sandboxing, I'm not sure why it was added.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py pvmfw_fdt_template_rs
Change-Id: I43390274740144122aae2a225807a6e1100c85c1
2023-11-27 12:28:14 -08:00
Cole Faust
eb9028d240 Sandbox libc_musl_sysroot_bits
Sandboxing it produces this diff:

  $ diff <(zipinfo -l out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip) <(zipinfo -l out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip)
  1,3c1,2
  < Archive:  out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip
  < Zip file size: 8535 bytes, number of entries: 16
  < -rw-r--r--  2.0 unx      421 bl      225 defN 08-Jan-01 00:00 include/bits/alltypes.h.in
  ---
  > Archive:  out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/libc_musl_sysroot_bits.zip
  > Zip file size: 5358 bytes, number of entries: 14
  17d15
  < -rw-r--r--  2.0 unx    10384 bl     2666 defN 08-Jan-01 00:00 include/bits/syscall.h.in
  19c17
  < 16 files, 21039 bytes uncompressed, 6439 bytes compressed:  69.4%
  ---

So the alltypes.h.in and syscall.h.in are removed from the zip after
sandboxing. This seems good, because those two files are handled
separately already in that Android.bp file, and are not regular header
files like the rest of the zip file.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libc_musl_sysroot_bits
Change-Id: I46b6340046ad7df85ea4fc9c54b46ade305661e6
2023-11-27 12:18:52 -08:00
Treehugger Robot
4e788f2456 Merge "Sandbox tflite-support genrules" into main 2023-11-27 18:41:42 +00:00
Treehugger Robot
40b8b16042 Merge "Sandbox libbssl_sys_src_nostd" into main 2023-11-27 10:28:27 +00:00
Treehugger Robot
d766a44530 Merge "Sandbox r8retrace genrules" into main 2023-11-23 00:17:28 +00:00
Cole Faust
1ddb8125d3 Sandbox libbssl_sys_src_nostd
go/roboleaf-busy-beavers-sandboxing

gensrcs should require output_extension to be set, when it's not,
you get some weird filename like `lib.`. Switch to genrules for
simplicity.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libbssl_sys_src_nostd
Change-Id: I4ec2686c560439c3150b74b14e313ed6b688720c
2023-11-22 15:23:50 -08:00
Cole Faust
954ef637e9 Merge "Sandbox trout genrules" into main 2023-11-22 22:05:42 +00:00
Cole Faust
28e46107cf Sandbox trout genrules
These were fixed in aosp/2838463, aosp/2839595, pa/2668052, and
pa/2668054.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py TracingVMProtoStub_cc TracingVMProtoStub_h VehicleServerProtoStub_cc@default-grpc VehicleServerProtoStub_cc@2.0-grpc-trout VehicleServerProtoStub_h@2.0-grpc-trout VehicleServerProtoStub_h@default-grpc
Change-Id: I9d21d608773e2974f8fca8af4dd16a654e8eb128
2023-11-22 12:09:27 -08:00
Cole Faust
f7474880a1 Sandbox atest_integration_fake_src
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py atest_integration_fake_src
Change-Id: Ib3ae70b877227df794fec5516a754a9c32b06637
2023-11-22 11:07:06 -08:00
Cole Faust
0931c29463 Sandbox tflite-support genrules
go/roboleaf-busy-beavers-sandboxing

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py tflite_support_metadata_schema tflite_support_spm_config tflite_support_spm_encoder_config
Change-Id: Iab64f9f3125977685a5aa1ccffb093a68e4ac68b
2023-11-21 18:00:38 -08:00
Cole Faust
4a0be5cc17 Sandbox MultiDexLegacyTestApp_genrule and android-cts-verifier
These both work with sandboxing already, I'm not sure why they
were added to this list.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py android-cts-verifier MultiDexLegacyTestApp_genrule
Change-Id: Ie5a194fbe202b84a30eb3738d07ffb4ec9061bca
2023-11-21 17:04:24 -08:00