Commit Graph

35462 Commits

Author SHA1 Message Date
Paul Duffin
05a103c073 Merge "Migrate sh package to a per test build directory" am: a36d0dc2b7 am: dd7a42a321
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636432

Change-Id: I58d5c9fd54ff733f1e7780cd6f92889b2b0b1c9f
2021-03-16 16:19:55 +00:00
Paul Duffin
de2569a1d8 Merge changes I0f516efd,I668f083b,Ifa70acad am: 768f10ac78 am: f7740dcb1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636431

Change-Id: I8e35ebb813f5c79c4b57be9e4c748a545aa37f27
2021-03-16 16:19:51 +00:00
Paul Duffin
82f76c4dcf Merge "Add (String)Path(s)RelativeToTop and assert functions" am: 6dcd2bfaa5 am: 160fde0333
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636428

Change-Id: I02f4b35298de5d344fc2d99a11f28ff726e58b96
2021-03-16 16:19:42 +00:00
Paul Duffin
609df5c2ca Merge "Fix hiddenapi tests to work without javaMockFS()" am: 248f386558
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634630

Change-Id: Iafe5599dfd0b9245719f908145413ffcd1d72859
2021-03-16 15:45:12 +00:00
Paul Duffin
5308375fd4 Merge "Convert hiddenapi tests to use test fixtures" am: af0379ca9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634629

Change-Id: Iae0fd40f741b106f65c0ebe4eed8c4cb543e745b
2021-03-16 15:45:03 +00:00
Paul Duffin
a6ece5dde2 Merge "Fix TestJavaSdkLibrary... tests to work without javaMockFS()" am: ebca5e6a68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634628

Change-Id: I456c7d2e5f9bc169251aa64117a282070b5d4dc3
2021-03-16 15:44:56 +00:00
Paul Duffin
dcdefb6b53 Merge "Convert JavaSdkLibrary... tests in java package to test fixtures" am: fb3fc0cf40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634627

Change-Id: I42b78d44f2d84e7fe5082ad5b906b1bcfdcd29c9
2021-03-16 15:44:48 +00:00
Justin DeMartino
e7c7a5e8d6 Merge "Allow extending of the list of directories to be scanned for VSDK" am: dd1decf7f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603623

Change-Id: I1289d0891e3f93fc0df1464ab7f20b8efd25b9a3
2021-03-16 15:44:23 +00:00
Ulya Trafimovich
3c902e7acc manifest_check.py: translate library names using dexpreopt configs.
Java modules that are defined in makefiles are not processed in
topological order, so it is necessary to communicate information from
dependencies via dexpreopt.config files. This has already been done in
make/core/dex_preopt_config_merger.py, and now manifest_check.py also
needs to get library names from their dexpreopt.config files.

This is to accommodate Java libraries which name differs from their
modules name. Soong properties `uses_libs`/`optional_uses_libs` and
makefile vars `LOCAL_USES_LIBRARIES`/`LOCAL_OPTIONAL_USES_LIBRARIES`
contain module names, not library names, so it is necessary to translate
them when comparing against library names in the manifest.

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: I7cfb17d6d74e37fc9f37d977f15f0d711bab5c8e
2021-03-16 15:43:05 +00:00
Paul Duffin
dd7a42a321 Merge "Migrate sh package to a per test build directory" am: a36d0dc2b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636432

Change-Id: I7d6de45b6e36b2eaedcd282ee6af17d05ae90add
2021-03-16 15:42:30 +00:00
Paul Duffin
f7740dcb1a Merge changes I0f516efd,I668f083b,Ifa70acad am: 768f10ac78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636431

Change-Id: I14fccfdc7e1974629d5865ef17087ec0a366991c
2021-03-16 15:42:21 +00:00
Paul Duffin
160fde0333 Merge "Add (String)Path(s)RelativeToTop and assert functions" am: 6dcd2bfaa5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636428

Change-Id: I1c9a2237a6fea3417a9fcb3aef1e951df59bcddc
2021-03-16 15:41:28 +00:00
Ulya Trafimovich
a76d6606ce Don't depend on nonexistent manifest when manifest_check is disabled.
This is a follow-up for https://android-review.googlesource.com/1614807.

Bug: 132357300
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Test: lunch qemu_trusty_arm64-userdebug && \
  m out/soong/.intermediates/packages/apps/DocumentsUI/DocumentsUI/android_common/DocumentsUI-unsigned.apk
Change-Id: I84c5d171bd976f35f342abd94b592506c71e4b1d
2021-03-16 15:34:50 +00:00
Paul Duffin
248f386558 Merge "Fix hiddenapi tests to work without javaMockFS()" 2021-03-16 15:34:36 +00:00
Paul Duffin
af0379ca9c Merge "Convert hiddenapi tests to use test fixtures" 2021-03-16 15:34:17 +00:00
Paul Duffin
ebca5e6a68 Merge "Fix TestJavaSdkLibrary... tests to work without javaMockFS()" 2021-03-16 15:34:08 +00:00
Paul Duffin
fb3fc0cf40 Merge "Convert JavaSdkLibrary... tests in java package to test fixtures" 2021-03-16 15:33:58 +00:00
Justin DeMartino
dd1decf7f6 Merge "Allow extending of the list of directories to be scanned for VSDK" 2021-03-16 15:12:17 +00:00
Paul Duffin
a36d0dc2b7 Merge "Migrate sh package to a per test build directory" 2021-03-16 15:08:41 +00:00
Paul Duffin
768f10ac78 Merge changes I0f516efd,I668f083b,Ifa70acad
* changes:
  Migrate etc package to a per test build directory
  Migrate genrule package to a per test build directory
  Use test specific build dir when needed
2021-03-16 15:08:29 +00:00
Paul Duffin
6dcd2bfaa5 Merge "Add (String)Path(s)RelativeToTop and assert functions" 2021-03-16 15:07:58 +00:00
Ulyana Trafimovich
072f40803f Merge "Reimplement verify_uses_libraries.sh in manifest_check.py." am: 2002bfa817 am: 8bd0efdef8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614807

Change-Id: I9a3125db222d9dc31cdc9241b04f4b3303326718
2021-03-16 14:45:33 +00:00
Paul Duffin
e9292b1459 Switch platform_compat_config to use common arch am: 4defbf4d39 am: 75c51ba191
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638281

Change-Id: I213738e09bee4613f93203b0dd6e935b07957114
2021-03-16 14:45:28 +00:00
Paul Duffin
3c54ef1e10 Disallow platform_compat_config modules in apex prebuilts property am: 1bc21dc7e6 am: c6df3b278a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638280

Change-Id: I3994109c2acb934d2be6039d8fdbf556b4783774
2021-03-16 14:45:17 +00:00
Paul Duffin
dc92abb705 Fix hiddenapi tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: I32e0173f3c2e97b6d6d831c6cfa51cc500f8d2b1
2021-03-16 14:25:21 +00:00
Paul Duffin
175947f654 Convert hiddenapi tests to use test fixtures
These tests rely on files provided by javaMockFS() so have been
converted to test fixtures to allow them to remove that dependency
which will allow javaMockFS() to be removed.

Bug: 182638834
Test: m nothing
Change-Id: Ifd4069a74fcf67e555f998ddbc4de3fde26b2aae
2021-03-16 14:25:21 +00:00
Paul Duffin
163043d615 Fix TestJavaSdkLibrary... tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: I140b88b3fdf2c532d266a196fee84675c518d859
2021-03-16 14:25:21 +00:00
Paul Duffin
22b77cd538 Convert JavaSdkLibrary... tests in java package to test fixtures
These tests rely on files provided by javaMockFS() so need to are being
converted to test fixtures to allow them to remove that dependency
which will allow javaMockFS() to be removed.

Bug: 182638834
Test: m nothing
Change-Id: If736b95d134fe73c0a0ccd438ec31e93568fb929
2021-03-16 14:25:21 +00:00
Ulyana Trafimovich
8bd0efdef8 Merge "Reimplement verify_uses_libraries.sh in manifest_check.py." am: 2002bfa817
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614807

Change-Id: I86e0b0b1b4519d857b3aea63931c738587d7c78d
2021-03-16 14:10:10 +00:00
Paul Duffin
75c51ba191 Switch platform_compat_config to use common arch am: 4defbf4d39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638281

Change-Id: Ib1183e73bebbbb714fa6545634ba2c06fb378feb
2021-03-16 14:09:55 +00:00
Paul Duffin
c6df3b278a Disallow platform_compat_config modules in apex prebuilts property am: 1bc21dc7e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638280

Change-Id: I42b92aca35d809804740da1998840d71dd629fcd
2021-03-16 14:08:57 +00:00
Ulyana Trafimovich
2002bfa817 Merge "Reimplement verify_uses_libraries.sh in manifest_check.py." 2021-03-16 13:37:03 +00:00
Paul Duffin
32b06c2ae6 Migrate sh package to a per test build directory
Bug: 182885307
Test: m nothing
Change-Id: I8e379c555e48ab482c56a19630d83a3a54126fc5
2021-03-16 12:46:52 +00:00
Paul Duffin
5f9f771dab Migrate etc package to a per test build directory
Bug: 182885307
Test: m nothing
Change-Id: I0f516efdf3344ba4c5d70c2fcc8d322f56e12a86
2021-03-16 12:46:52 +00:00
Paul Duffin
e66946b43e Migrate genrule package to a per test build directory
Bug: 182885307
Test: m nothing
Change-Id: I668f083ba914569198eaa90642821340321d6b4c
2021-03-16 12:46:52 +00:00
Paul Duffin
dff5ff064e Use test specific build dir when needed
If a FixtureFactory was created with a nil buildDirSupplier then this
change will cause it to create a test specific directory instead. This
will allow packages whose tests have been fully converted to the test
fixture model to remove the need for the package level buildDir
variable.

Bug: 182885307
Test: m nothing
Change-Id: Ifa70acadbd90356fadbe39675bac3214d925aa2f
2021-03-16 12:35:04 +00:00
Paul Duffin
567465da8c Add (String)Path(s)RelativeToTop and assert functions
The existing NormalizePathForTesting function does not handle make
install paths very well, as it returns a relative path with a leading
"../" which is very confusing. It also does not clearly differentiate
between the different paths.

These functions return paths that are basically what are seen in a
normal developer build, i.e.
* <source path>
* out/soong/<soong output path>
* out/<make output path>

That makes tests that use them easier to understand.

Follow up changes will clean up the existing usages of the
Normalize... functions.

Bug: 182885307
Test: m nothing
Change-Id: I17ddc996bef5bbbf4a62da8334ea6ce29e306109
2021-03-16 12:23:56 +00:00
Paul Duffin
f75ab18b5b Add new compat_configs property to the apex am: 3abc174cfd am: d4716ce5a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638279

Change-Id: I3822016f85c030f27820538ba133ec007861417c
2021-03-16 08:05:09 +00:00
Paul Duffin
6fb02328eb Convert TestCompatConfig test to use test fixtures am: a369c7b50d am: 28cae4ca6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626505

Change-Id: Ief32c21320ead2b92f47b3e485e2c3736290903f
2021-03-16 08:05:05 +00:00
Paul Duffin
e24da8d2c4 Provide preparer for using platform_compat_config modules am: 4eb4b41cef am: 74b85bd619
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626504

Change-Id: I71104256894fe69246740b42d5c7647e69353697
2021-03-16 08:04:58 +00:00
Lukacs T. Berki
89e9a16ebd Remove global variables from Blueprint.
The end goal of this exercise is to remove all mutable global state so
that multiple Blueprint instances can be run in the same process.

Test: Presubmit.
Change-Id: Idb34b0920f2c7d92efb9328ce8a78b7306f89571
2021-03-16 08:40:51 +01:00
Paul Duffin
d4716ce5a6 Add new compat_configs property to the apex am: 3abc174cfd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638279

Change-Id: I5197d5ced2dad822c986a8874afef36c29c2fe25
2021-03-16 07:26:37 +00:00
Paul Duffin
28cae4ca6f Convert TestCompatConfig test to use test fixtures am: a369c7b50d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626505

Change-Id: I90ab7b1ce57f0f412f8a53090b6b56e921b076e7
2021-03-16 07:26:30 +00:00
Paul Duffin
74b85bd619 Provide preparer for using platform_compat_config modules am: 4eb4b41cef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626504

Change-Id: Id9af1fa24826b17936b206242e769dda0e905167
2021-03-16 07:25:50 +00:00
Jiyong Park
972e06c41f Add vbmeta module type
The module type is to create vbmeta image out of other partitions.

Bug: 180676957
Test: m microdroid_vbmeta microdroid_vbmeta_system
Inspect the built image using `avbtool info_image --image <image>`

Change-Id: Iac92e9ab1640dcd488af69842e09850a91262bf1
2021-03-16 11:34:11 +09:00
Colin Cross
665b6786b8 Fix removing partial zip file on error
Fix the shadowed err variable so that it is visible to the defer
function that removes the partial zip file on error.

Bug: 182761771
Test: manual
Change-Id: Ia67ac4bca5ef0107466edf25a76c74d70c243d3f
2021-03-16 00:20:19 +00:00
Paul Duffin
4defbf4d39 Switch platform_compat_config to use common arch
Bug: 182816033
Test: m nothing
Change-Id: If8886edd9278d67fe2b6288a6bd8b152f2314401
2021-03-15 23:19:39 +00:00
Paul Duffin
1bc21dc7e6 Disallow platform_compat_config modules in apex prebuilts property
Bug: 182816033
Test: m nothing
Change-Id: I50dcc358e8ae143e21b1fbf1a12835bf1342606f
2021-03-15 23:19:39 +00:00
Paul Duffin
3abc174cfd Add new compat_configs property to the apex
Bug: 182816033
Test: m nothing
Change-Id: I485d7b178c0ed17e336a6ac2a13e8313426f374b
2021-03-15 23:19:36 +00:00
Justin DeMartino
383bfb392f Allow extending of the list of directories to be scanned for VSDK
Bug: 180925851
Bug: 181564692
Test: m nothing, manually
Change-Id: Ifff95db4c9ec362322fecca08f7fd1a7b60755c0
2021-03-15 23:14:47 +00:00