Commit Graph

35187 Commits

Author SHA1 Message Date
Treehugger Robot 3985e1e498 Merge "Remove .rustc ELF section from mini-debug-info." am: c29088b727
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647201

Change-Id: I8cdfde552f2cfcddaebafb80ad896e16af3a8fe7
2021-03-23 11:31:08 +00:00
Paul Duffin 7ee6e8fa0f Merge "Add platform_compat_config to sdk" 2021-03-23 11:17:06 +00:00
Paul Duffin e835389123 Merge "Add TestBasicSdkWithBootImage" 2021-03-23 11:13:12 +00:00
Paul Duffin 713b501017 Merge "Register the propagateRROEnforcementMutator" 2021-03-23 10:46:49 +00:00
Treehugger Robot c29088b727 Merge "Remove .rustc ELF section from mini-debug-info." 2021-03-23 09:13:53 +00:00
Paul Duffin f84f035e13 Merge "Add preparer for overlay pre-singleton registration" am: e0998ab561
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649792

Change-Id: I19a6efbaa18fe0706f6bce0bb4df999fc30b2db2
2021-03-23 08:53:38 +00:00
Paul Duffin afe10ea7c8 Merge "Add TestingModule.VariablesForTestsRelativeToTop" am: 010bb3c5b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649791

Change-Id: I8839b3fa45ad01298a4fcc47772a0d238d32832d
2021-03-23 08:53:29 +00:00
Paul Duffin bbf40a9615 Merge "Add TestingBuildParams.RelativeToTop()" am: a327008e65
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649790

Change-Id: I0d44beca7fef7e5545dc79d4363784cab7334a70
2021-03-23 08:52:35 +00:00
Paul Duffin 30cb19daa5 Merge "Improve searching for TestingBuildParams using the output file" am: 332310aac4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649789

Change-Id: I7c58a078323e2dbe59adc2d92937b06dfadc660c
2021-03-23 08:48:43 +00:00
Paul Duffin 9001af1efa Merge "Move helper methods that take testBuildProvider into baseTestingComponent" am: b09a2d6af4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649788

Change-Id: I9e3bccc819ef7377a7951e58c2514f39e9157149
2021-03-23 08:43:43 +00:00
Paul Duffin 7ef69a5c09 Merge "Extract functionality common to TestingModule/Singleton" am: 48c21e6454
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1649787

Change-Id: Ia31d49127da3650ba48550aef017c059488e92aa
2021-03-23 08:42:23 +00:00
Paul Duffin e0998ab561 Merge "Add preparer for overlay pre-singleton registration" 2021-03-23 07:21:30 +00:00
Paul Duffin 010bb3c5b3 Merge "Add TestingModule.VariablesForTestsRelativeToTop" 2021-03-23 07:21:01 +00:00
Paul Duffin a327008e65 Merge "Add TestingBuildParams.RelativeToTop()" 2021-03-23 07:20:33 +00:00
Paul Duffin 332310aac4 Merge "Improve searching for TestingBuildParams using the output file" 2021-03-23 07:20:04 +00:00
Paul Duffin b09a2d6af4 Merge "Move helper methods that take testBuildProvider into baseTestingComponent" 2021-03-23 07:19:42 +00:00
Paul Duffin 48c21e6454 Merge "Extract functionality common to TestingModule/Singleton" 2021-03-23 07:19:13 +00:00
Treehugger Robot 7568c9f17c Merge "Fix PackagingBase.CopyDepsToZip" am: 9b6108f8de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624459

Change-Id: I7070c1e08a1127d8dcd1b717cddaef42df9443b0
2021-03-23 04:28:51 +00:00
Treehugger Robot 8c8a93f231 Merge "Fix default value of BoardSepolicyVers" am: 04a2693407
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1648191

Change-Id: Ia8e5b4ccaa9aafd928579303ca37dd2f31928c92
2021-03-23 04:27:38 +00:00
Treehugger Robot 9b6108f8de Merge "Fix PackagingBase.CopyDepsToZip" 2021-03-23 04:21:38 +00:00
Treehugger Robot 04a2693407 Merge "Fix default value of BoardSepolicyVers" 2021-03-23 03:53:18 +00:00
Paul Duffin 2863cd8ae6 Convert boot_image_sdk_test.go to fixtures am: 4a1d451405
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645679

Change-Id: Ib0c44f2606238f9e438bfbeeda9a9929c87cd7bf
2021-03-22 23:01:38 +00:00
Paul Duffin 33972970ea Allow sdk package tests to optimize their test setup am: cf3ee2f87e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645676

Change-Id: I16d55dbb80f577dd1f3b7a513eb5c12ae8a8dea6
2021-03-22 23:01:30 +00:00
Paul Duffin 6006e869d8 Use test fixtures in CheckSnapshot() am: c93c98e315
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647191

Change-Id: I23a650f9689b41ad6fb060c0a4d8c8562f8a7134
2021-03-22 23:00:51 +00:00
Paul Duffin 752a5a2122 Remove emptyFixtureFactory from apex and java am: 70d3bee3e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647204

Change-Id: Id4b06bc9a16911949bdf234eee4e9e9b349b7fb6
2021-03-22 22:56:41 +00:00
Paul Duffin 7047fd751a Remove usages of FixtureFactory from misc packages am: 89648f98fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647196

Change-Id: Ic61df38c546597adb0590252bed4cf7ee380c5ef
2021-03-22 22:49:45 +00:00
Paul Duffin bfdf693d99 Remove uses of FixtureFactory from android package am: 30ac3e7ca7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647195

Change-Id: Ib44f15787d5db62637f58e5baa1774606dc55fec
2021-03-22 22:45:41 +00:00
Paul Duffin 120cdd5ddf Deprecate FixtureFactory in favor of FixturePreparer am: ff2aa69a86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647194

Change-Id: I13ee92cf31456da4292debdfdd4925e3f4c6c894
2021-03-22 22:38:15 +00:00
Paul Duffin 04ba70d665 Register the propagateRROEnforcementMutator
This adds the registration of the mutator to the existing register...
method which will include it in PrepareForTestWithJavaBuildComponents.

Bug: 182885307
Test: m nothing
Change-Id: I6cea716a3ff4d8abdb80543b7e0ddf22246ffa30
2021-03-22 22:09:53 +00:00
Paul Duffin 42da69d784 Add preparer for overlay pre-singleton registration
It appears as though this is the first pre-singleton type to actually
be registered with the InitRegistrationContext as it failed due to an
uninitialized map, so this change also fixes that.

Bug: 182885307
Test: m nothing
Change-Id: Ibbf6d0db5f3c2fcc89291a16aa5f16b8b5009bd3
2021-03-22 22:09:53 +00:00
Paul Duffin 97d8b40fec Add TestingModule.VariablesForTestsRelativeToTop
Bug: 182885307
Test: m nothing
Change-Id: Id1265b07533f226965555e703fb9fa81aea4ec91
2021-03-22 22:09:53 +00:00
Paul Duffin 709e0e32c2 Add TestingBuildParams.RelativeToTop()
The methods returns a copy of TestingBuildParams with every usage of a
path that is relative to the temporary test build directory with a path
relative to a notional top. Similar to how PathRelativeToTop does.

Bug: 182885307
Test: m nothing
Change-Id: I6ec20fc52ed76748138f0d48b4df80f765dfcfdc
2021-03-22 22:09:53 +00:00
Paul Duffin 4e6e35c561 Improve searching for TestingBuildParams using the output file
When searching for an TestingBuildParams this change will compare the
supplied path against the value returned by PathRelativeToTop() as well
as the String() and Rel() values. In the event that it cannot find the
file it also formats the available outputs, one per line with both rel
and path relative to top.

Bug: 182885307
Test: m nothing
Change-Id: Icbd37018b9a028abf37e27d1bea12a407316e031
2021-03-22 22:09:53 +00:00
Paul Duffin 0eda26b96b Move helper methods that take testBuildProvider into baseTestingComponent
Allows the removal of the provider parameter and makes it easier to add
new functionality to baseTestingComponent.

Bug: 182885307
Test: m nothing
Change-Id: Ie8ac600cbce982f2c5fc24a22968efe0c2a29d0c
2021-03-22 22:09:53 +00:00
Paul Duffin 31a228846b Extract functionality common to TestingModule/Singleton
Bug: 182885307
Test: m nothing
Change-Id: Ib7c96b34512ad2a190a24c9dd07ea259d1378b44
2021-03-22 22:09:53 +00:00
Ryan Prichard 29b9de083e Switch platform-NDK unwinder to LLVM libunwind.a prebuilt
Link against the libunwind.a shipped with the NDK so it matches what's
linked into the NDK's libc++_shared.so.

Bug: http://b/153025717
Test: device boots, manually inspect some linker command lines
Change-Id: Icc79844f5e70f0eaa97ea758449c30fbddd030d2
2021-03-22 13:46:54 -07:00
Paul Duffin a49442d0d0 Replace FixturePreparer.visit() with list() am: 4ca6752b21
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647193

Change-Id: Ic0b097e834c94c879645d88fb43ff857336ed3ec
2021-03-22 19:29:16 +00:00
Paul Duffin 2e831d6ae6 Remove errorHandler from FixtureFactory am: cff464f794
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1647192

Change-Id: If8cacd24e66108952219597026c0391b660bc3e9
2021-03-22 19:29:08 +00:00
Paul Duffin 559c073415 Allow access to preparers that produced a TestResult am: 592518290f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645675

Change-Id: I7bde6493e80db34631ddac77b6405d5034d36886
2021-03-22 19:28:24 +00:00
Paul Duffin abe8504ce1 Merge "Ensure that DepIsInSameApex is not called for ExcludeFromApexContentsTag" am: 6bef6fee3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645680

Change-Id: I2131e494bab389c13499b923618bf62235cb99e9
2021-03-22 19:20:17 +00:00
Paul Duffin 001b2342f7 Add platform_compat_config to sdk
Bug: 182402754
Test: m nothing
Change-Id: Ife3f4f64fc116d62eb7c3cc10c50e00f19d1d81c
2021-03-22 19:13:40 +00:00
Paul Duffin 04b4a19fe6 Add TestBasicSdkWithBootImage
Added to reproduce the conditions that lead to the error reported in
the bug so they can be fixed. There were a number of issues that were
fixed in previous changes and this test verifies that they have been
fixed.

Bug: 182992071
Test: m nothing
Change-Id: I2197899b284a99973e698db314b15812f602b141
2021-03-22 19:13:40 +00:00
Paul Duffin 4a1d451405 Convert boot_image_sdk_test.go to fixtures
Bug: 182638834
Test: m nothing
Change-Id: I8c9cb399b15d04ec8465a3b3bb4b43561aef46fd
2021-03-22 19:13:22 +00:00
Pirama Arumuga Nainar 042fce9dfd Merge "Switch to clang r416183 12.0.4." am: 679d5308ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640559

Change-Id: Ic2dce17dec076c412af4b43484dae7239456d533
2021-03-22 19:13:04 +00:00
Paul Duffin 4ca6752b21 Replace FixturePreparer.visit() with list()
The visit() method was dropped in favor of a list() method as the
latter makes it easier to treat fixtureFactory, simpleFixturePreparer
and compositeFixturePreparer as simple collections of already flattened
and deduped *simpleFixturePreparers. That will be used in a follow up
change.

Bug: 183235980
Test: m nothing
Change-Id: Ia41ae9bd4f9c39c85865ba698e0da6be00519caf
2021-03-22 18:31:53 +00:00
Paul Duffin cf3ee2f87e Allow sdk package tests to optimize their test setup
Extracts the setup for apex from prepareForSdkTest to allow it to be
reused without using all of it. That will allow tests to optimize their
test setup.

Bug: 182638834
Test: m nothing
Change-Id: I2056103b15c2737a616ee29ff890c6af0722e6d2
2021-03-22 18:31:53 +00:00
Paul Duffin c93c98e315 Use test fixtures in CheckSnapshot()
Using the preparer(s) that were used to run the test to verify the
integrity of the generated snapshot ensures that it will be verified in
the same environment as the snapshot was generated. This ensures that
as sdk tests are migrated to use fixtures that are optimized for each
test that they will benefit from those optimizations when checking the
snapshot.

Bug: 183184375
Test: m nothing
Change-Id: I62b383f9a1d9a77d1cabb101d9d1e4a976170fe3
2021-03-22 18:31:53 +00:00
Paul Duffin 70d3bee3e0 Remove emptyFixtureFactory from apex and java
Bug: 183235980
Test: m nothing
Change-Id: I350b45e2f57430fb158f4141a566e75de17208cd
2021-03-22 18:31:53 +00:00
Paul Duffin 89648f98fa Remove usages of FixtureFactory from misc packages
These packages have already been migrated to use per test build
directory so have no need for a FixtureFactory.

Bug: 183235980
Test: m nothing
Change-Id: I667d1d992caaf0f615de91f89efdae11c44986c2
2021-03-22 18:31:53 +00:00
Paul Duffin 30ac3e7ca7 Remove uses of FixtureFactory from android package
Bug: 183235980
Test: m nothing
Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
2021-03-22 18:31:53 +00:00