Commit Graph

35462 Commits

Author SHA1 Message Date
Jaewoong Jung
bc15e3a798 Improve java.go readability.
Test: TreeHugger
Change-Id: I98bb7bddb740451ff2ccd28dcdaddff27e35a8cd
2021-03-15 13:58:44 -07:00
Paul Duffin
6b0e66b6a6 Convert TestJavaSdkLibraryEnforce to test fixtures am: 05f72de083 am: d486fc968f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634626

Change-Id: I3a0cbf953d393309ab2b4ee9ab4011095f0a5fc5
2021-03-15 20:53:44 +00:00
Paul Duffin
f2157304dd Create sub tests for each test in TestJavaSdkLibraryEnforce am: aa6caa7fa8 am: 1094ec685f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634625

Change-Id: I4ac34464a7f81461d3f6ad230ea81a8ee83fc9da
2021-03-15 20:53:42 +00:00
Paul Duffin
17fc657cf2 Provide support for preparing tests with prebuilt_apis am: 2ff6d1b6d2 am: f2c9340f3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634624

Change-Id: I1cc640c7e73b6627936ed95460598caefa65af14
2021-03-15 20:53:39 +00:00
Paul Duffin
d486fc968f Convert TestJavaSdkLibraryEnforce to test fixtures am: 05f72de083
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634626

Change-Id: Iffeba20525f3b8b1a58cc5b5bfac43dfae3f27e1
2021-03-15 20:01:57 +00:00
Paul Duffin
1094ec685f Create sub tests for each test in TestJavaSdkLibraryEnforce am: aa6caa7fa8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634625

Change-Id: If95c2ab9164bae96df46c129263541c676705211
2021-03-15 20:01:54 +00:00
Paul Duffin
f2c9340f3e Provide support for preparing tests with prebuilt_apis am: 2ff6d1b6d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634624

Change-Id: I8d07c9fa1b50ebc5f064fa30a376dc58b1e691f9
2021-03-15 20:01:24 +00:00
Paul Duffin
a369c7b50d Convert TestCompatConfig test to use test fixtures
As this test is the only test in the apex package to use the
platform_compat_config module type it does not make sense to include
that in all the tests so instead this converts the test to use fixtures
so it can easily customize it with the additional module type.

Bug: 181070625
Test: m nothing
Change-Id: I56fda772ee336db6cfb677143aa28b1a18911bff
2021-03-15 19:56:38 +00:00
Paul Duffin
4eb4b41cef Provide preparer for using platform_compat_config modules
Bug: 181070625
Test: m nothing
Change-Id: I92ec022fae0951a21c2e885d3ded7c98daacfcfc
2021-03-15 19:56:38 +00:00
Paul Duffin
b42e68316e Merge "Extract PrepareForTestWithJavaSdkLibraryFiles from javaMockFS()" am: ba2afa93d2 am: df1d7d5f49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634623

Change-Id: Ie8cfa778d00f2dc4145d449718ba6de87b2671a5
2021-03-15 18:04:24 +00:00
Paul Duffin
ebde79862a Merge "Convert testJavaError to test fixtures" am: 56372081ed am: c0acd402ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634622

Change-Id: I1fdaa8bb01ac6138c8c4f733424ad527499cbbd1
2021-03-15 18:04:19 +00:00
Paul Duffin
7c46058e77 Merge "Clean up testApp and testAppConfig" am: 6f6f1eb83c am: 4f5f1d89d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1633661

Change-Id: I103a2818e3c8707ff5e7c398fea0d0d72201f408
2021-03-15 18:04:01 +00:00
Paul Duffin
df1d7d5f49 Merge "Extract PrepareForTestWithJavaSdkLibraryFiles from javaMockFS()" am: ba2afa93d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634623

Change-Id: I9402e50410dc809a961f428f112b7ffc685a98fa
2021-03-15 17:45:36 +00:00
Paul Duffin
c0acd402ef Merge "Convert testJavaError to test fixtures" am: 56372081ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634622

Change-Id: I82e90bcaf17b358aaa72b7c5c79fb0911282edff
2021-03-15 17:45:29 +00:00
Paul Duffin
4f5f1d89d3 Merge "Clean up testApp and testAppConfig" am: 6f6f1eb83c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1633661

Change-Id: I58649007c746fb5c7b1405a2e36c464a413ab7b7
2021-03-15 17:44:16 +00:00
Paul Duffin
05f72de083 Convert TestJavaSdkLibraryEnforce to test fixtures
Bug: 182638834
Test: m nothing
Change-Id: I99efe76008f9ca0996177f47923274ca594a6858
2021-03-15 17:17:43 +00:00
Paul Duffin
aa6caa7fa8 Create sub tests for each test in TestJavaSdkLibraryEnforce
Bug: 182638834
Test: m nothing
Change-Id: I509b071ee4e470da45159b2174aae7acf1b0eb1a
2021-03-15 17:17:43 +00:00
Paul Duffin
2ff6d1b6d2 Provide support for preparing tests with prebuilt_apis
Adds general support for generating a set of prebuilt apis for a set of
releases and modules. Plus some wrappers for common use cases.

This temporarily will delete any existing conflicting files and replace
them so that it can be used in tests without first removing
javaMockFS(). The future update that removes javaMockFS() will also
remove that workaround.

Bug: 182638834
Test: m nothing
Change-Id: If4e2118f2384b9866cf3f85a5afec1e2e4f9ac95
2021-03-15 17:17:40 +00:00
Paul Duffin
ba2afa93d2 Merge "Extract PrepareForTestWithJavaSdkLibraryFiles from javaMockFS()" 2021-03-15 17:14:03 +00:00
Paul Duffin
56372081ed Merge "Convert testJavaError to test fixtures" 2021-03-15 17:13:55 +00:00
Paul Duffin
6f6f1eb83c Merge "Clean up testApp and testAppConfig" 2021-03-15 17:13:45 +00:00
Liz Kammer
ba3ea16f14 Use handcrafted build targets in bp2build
If both bp2build_available and label are specified, label will be
preferred.

Initially, we copy the entire BUILD.bazel file. Eventually we may move
this to use bazel query for a more accurate result.

Test: go test *
Test: build/bazel/scripts/milestone-2/demo.sh full
Test: GENERATE_BAZEL_FILES=true m nothing
      edit bionic/libc/tools/BUILD.bazel
      GENERATE_BAZEL_FILES=true m nothing and verify changes picked up
Bug: 180516554
Change-Id: I43025583300e6b10d2c18032cd4a76237b578d59
2021-03-15 13:09:25 -04:00
Jiyong Park
ac4076de9d bootimg signs image using verity_utils
Previously, bootimg signed the image using avbtool. This didn't work
because avbtool always requires that the partition size is given via
'--partition_size' parameter. The partition size is hard to estimate
especially when the image is not for a real physical partition, but for
a logical partition in a composite image.

With this change, the signing of bootimg is done by verity_utils.py
which internally uses avbtool. The python script is capable of
calculating the minimum required partition size when the partition size
is not given.

In addition, this change adds 'partition_name' property to the
`android_filesystem` module type so that we can customize the partition
name field in the vbmeta descriptor.

Bug: 180676957
Test: m microdroid-boot-5.10
Change-Id: I2e4aa626cf06a2177b4a8d90ff9b9006d2927ae4
2021-03-16 00:34:57 +09:00
Jiyong Park
291df17d28 Merge "bootimg supports v4 header" am: ca5e611e0a am: d279ff2313
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620744

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d909a9b7b195d6cc0fc3c6157f741b1912cc7e5
2021-03-15 15:23:59 +00:00
Treehugger Robot
cb76ff52c4 Merge "Add a way to remove duplicates from Bazel label lists, to e.g. avoid duplicate deps." am: 07d73efa2d am: 3942324565
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1633479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If94bd0ed1cfd46f73079a2e761e6e8669333303b
2021-03-15 15:23:54 +00:00
Jiyong Park
d279ff2313 Merge "bootimg supports v4 header" am: ca5e611e0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620744

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I181f611d99ed10d101544174885dc7b015a139ea
2021-03-15 14:49:32 +00:00
Treehugger Robot
3942324565 Merge "Add a way to remove duplicates from Bazel label lists, to e.g. avoid duplicate deps." am: 07d73efa2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1633479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id25d40c4510897675ed13a4ac807d05d585aa7fe
2021-03-15 14:48:45 +00:00
Jiyong Park
ca5e611e0a Merge "bootimg supports v4 header" 2021-03-15 14:39:07 +00:00
Treehugger Robot
07d73efa2d Merge "Add a way to remove duplicates from Bazel label lists, to e.g. avoid duplicate deps." 2021-03-15 14:12:39 +00:00
Ulya Trafimovich
0aba252e15 Reimplement verify_uses_libraries.sh in manifest_check.py.
Previously there were two different scripts that did similar things:
1) build/soong/scripts/manifest_check.py
2) build/make/core/verify_uses_libraries.sh

Both scripts extracted <uses-library> tags and `targetSdkVersion` from
the manifests of Java modules, but 1) worked for XML manifests, and 2)
worked for APKs. This CL reimplements the functionality from 2) in 1),
so that one script can handle both XML manifests and APKs.

Bug: 132357300

Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors

Change-Id: Id1b66e4f3f30f307dba70cb111c7571762cb546a
2021-03-15 13:50:49 +00:00
satayev
13c655bf29 Merge "Don't track modules that are only available to APEXes." am: 2338d6f6e4 am: ebfe02a781
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I468324eaa0ed012feba41cbf99809c8bd6ea397c
2021-03-15 13:28:54 +00:00
Thiébaud Weksteen
51e3138c23 Merge "Export OUT_DIR variable to rust-project.json" am: e5eb33b634 am: c634756619
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1608134

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie35bd6e25ce4a42b14046f5f5deff67f502d63aa
2021-03-15 13:28:29 +00:00
satayev
ebfe02a781 Merge "Don't track modules that are only available to APEXes." am: 2338d6f6e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628693

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78ef7f5255da2dffa208fd609052645c32c86bfe
2021-03-15 12:52:18 +00:00
Thiébaud Weksteen
c634756619 Merge "Export OUT_DIR variable to rust-project.json" am: e5eb33b634
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1608134

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4072bf62bf64ac74f30dc7012ebc2975ad4d073f
2021-03-15 12:50:40 +00:00
satayev
2338d6f6e4 Merge "Don't track modules that are only available to APEXes." 2021-03-15 12:47:00 +00:00
Thiébaud Weksteen
e5eb33b634 Merge "Export OUT_DIR variable to rust-project.json" 2021-03-15 12:16:48 +00:00
Paul Duffin
972e1eafe0 Merge "Convert ...InstallHwasan.. tests to use fixtures" am: ef0449b0f3 am: feed9a6153
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I198ca31959a9f549af19344c136b30d6efd4cbe8
2021-03-15 12:12:47 +00:00
Rupert Shuttleworth
2e4219be73 Add a way to remove duplicates from Bazel label lists, to e.g. avoid duplicate deps.
Test: Added unit tests, and also resolves bp2build error.
Change-Id: I6e01d9e233ec21dbb244e5682cbeebbc3a1ac0c4
2021-03-15 11:51:31 +00:00
Paul Duffin
feed9a6153 Merge "Convert ...InstallHwasan.. tests to use fixtures" am: ef0449b0f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626503

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2529a69e75f0c15e0ede332865792ad82670207f
2021-03-15 11:33:54 +00:00
Paul Duffin
ef0449b0f3 Merge "Convert ...InstallHwasan.. tests to use fixtures" 2021-03-15 11:09:22 +00:00
Nicolas Geoffray
5a8f6c5c96 Merge "Treat core_platform as stable unless module uses legacy" am: fb856f6add am: b684567a46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619411

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I501e1099d77697b34c70f13b064840b94424d52d
2021-03-15 09:57:43 +00:00
Nicolas Geoffray
b684567a46 Merge "Treat core_platform as stable unless module uses legacy" am: fb856f6add
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619411

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8706f0ad6f9dc4d105f8953f5a16c42d2cb75210
2021-03-15 09:17:49 +00:00
Nicolas Geoffray
fb856f6add Merge "Treat core_platform as stable unless module uses legacy" 2021-03-15 08:42:43 +00:00
Justin Yun
13decfb0bb Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.

__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.

Bug: 180646847
Test: m nothing
Change-Id: Id6c3e1e3d47deaf3684c0c02964718658cf2fec5
2021-03-15 17:28:59 +09:00
Thiébaud Weksteen
ee6a89ba44 Export OUT_DIR variable to rust-project.json
This variable is required by rust-analyzer to correctly process crates
that uses the include!(concat!(env!("OUT_DIR"), ...)) pattern.

Adds an initialize method to baseCompiler to save the computed path for
this directory. It is not possible to use the BeginMutator as the
BaseModuleContext does not contain enough information to use
PathForModuleOut.

Bug: 175004835
Test: SOONG_GEN_RUST_PROJECT=1 m nothing; inspect rust-project.json
Change-Id: If47b3832d3cca5712ae87773c174a61f5ee27bf8
2021-03-15 08:13:20 +00:00
Remi NGUYEN VAN
a69859e489 Merge "Add service-connectivity-pre-jarjar to legacy core platform list" am: aa52d66cd5 am: d0d52172ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625964

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d28b61f11550437eba438fefb7d202b4aab2a88
2021-03-15 02:49:00 +00:00
Remi NGUYEN VAN
d0d52172ed Merge "Add service-connectivity-pre-jarjar to legacy core platform list" am: aa52d66cd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625964

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7b7568d3e4ec0719c29eed58e2de2d16deffb57d
2021-03-15 02:05:41 +00:00
Remi NGUYEN VAN
aa52d66cd5 Merge "Add service-connectivity-pre-jarjar to legacy core platform list" 2021-03-15 01:32:47 +00:00
Paul Duffin
bf028b533d Extract PrepareForTestWithJavaSdkLibraryFiles from javaMockFS()
Needed for tests in both java and sdk packages.

Bug: 182638834
Test: m nothing
Change-Id: Ia8c5e7db47d8b63bf8dcf2965b3af60a4d35a9e5
2021-03-14 01:08:26 +00:00
Paul Duffin
6bac49c560 Convert testJavaError to test fixtures
Bug: 182638834
Test: m nothing
Change-Id: If6de91cd60fea36c945f2b0d51a04e26c838e4af
2021-03-14 01:08:26 +00:00