Commit Graph

34515 Commits

Author SHA1 Message Date
Paul Duffin 342f88f999 Merge "Make error handlers treat any failures as fatal" am: 059f7f1ff3 am: 163f65aa28
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619407

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic5bfd923e0e5e04ad0c7554ec7101d84d93f6566
2021-03-06 09:06:48 +00:00
Paul Duffin 9524aa2cd4 Merge "Avoid SetErrorHandler mutating FixtureFactory" am: 87d7dd918a am: 672cf221da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I55aeed5047af0bf47f5a8d74ab209b2e8bf5bad5
2021-03-06 09:06:37 +00:00
Paul Duffin 1f50ff0df6 Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" am: 0805d4ebdd am: b6ae322278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621414

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I98e32ff064e2d6617387c55a9eb4d8e331d0d17b
2021-03-06 09:06:22 +00:00
Paul Duffin 661f39a01d Merge "Rename FixturePreparers to GroupFixturePreparers" am: 166a488efe am: 673bce632a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I91b63ad522aaf956adf27e6e5d18ff815e49bf0c
2021-03-06 09:06:15 +00:00
Paul Duffin e672daac6b Merge "Fix mutator ordering issue in apex tests" am: 97c8128eea am: d8033e1d26
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I84cb412a6a78c132107f962e3d746f7c5941c2e3
2021-03-06 09:06:03 +00:00
Treehugger Robot 82ebdbe1a7 Merge "Remove wired corpus name, use the one from the environment" am: d8570b3077 am: 4124d9610f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622005

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb0828fd63b485ec9d07904e5d4c7aad937f69d7
2021-03-06 09:05:42 +00:00
Paul Duffin 163f65aa28 Merge "Make error handlers treat any failures as fatal" am: 059f7f1ff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619407

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id44496b718567ac4258f268639e1e8e902904cb8
2021-03-06 08:47:59 +00:00
Paul Duffin 672cf221da Merge "Avoid SetErrorHandler mutating FixtureFactory" am: 87d7dd918a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619409

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I93dd6c172359744bd88b9080e5a65af6b27c6bcf
2021-03-06 08:47:49 +00:00
Paul Duffin b6ae322278 Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" am: 0805d4ebdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621414

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I587cd237e6a3385edcc7b230ca39522d36b35463
2021-03-06 08:47:41 +00:00
Paul Duffin 673bce632a Merge "Rename FixturePreparers to GroupFixturePreparers" am: 166a488efe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1612943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iee52dc35dc83a9f77b227f5506c7c480dc9af129
2021-03-06 08:47:32 +00:00
Paul Duffin d8033e1d26 Merge "Fix mutator ordering issue in apex tests" am: 97c8128eea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5f14eb119898c41cea5fb4b0f67b492ec1978979
2021-03-06 08:47:18 +00:00
Treehugger Robot 4124d9610f Merge "Remove wired corpus name, use the one from the environment" am: d8570b3077
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622005

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5ade4819f5233dce96fafc018da5e8f80d876c0
2021-03-06 08:46:24 +00:00
Paul Duffin 059f7f1ff3 Merge "Make error handlers treat any failures as fatal" 2021-03-06 08:45:54 +00:00
Paul Duffin 87d7dd918a Merge "Avoid SetErrorHandler mutating FixtureFactory" 2021-03-06 08:44:51 +00:00
Paul Duffin 0805d4ebdd Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" 2021-03-06 08:43:56 +00:00
Paul Duffin 166a488efe Merge "Rename FixturePreparers to GroupFixturePreparers" 2021-03-06 08:42:53 +00:00
Paul Duffin 97c8128eea Merge "Fix mutator ordering issue in apex tests" 2021-03-06 08:38:14 +00:00
Treehugger Robot d8570b3077 Merge "Remove wired corpus name, use the one from the environment" 2021-03-06 08:09:25 +00:00
Julien Desprez a0ad77e293 Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" am: b1778a42cb am: 77294d573e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621859

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifd83baecee3bd7c1a608a249a9e97e7bbb1b389d
2021-03-06 03:40:52 +00:00
Julien Desprez 77294d573e Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" am: b1778a42cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621859

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51914f923f709a2f7c046308128f84836f0ea732
2021-03-06 03:22:27 +00:00
Julien Desprez b1778a42cb Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" 2021-03-06 02:40:44 +00:00
Colin Cross 7cbf691298 Merge "Exempt framework-res from UseApiFingerprint" am: cd2df5dec6 am: 7b91027296
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621782

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3069018a92d5cad99f59cd7db008c02025e7c8bc
2021-03-06 00:58:32 +00:00
Colin Cross 0a0763a8a7 Merge changes from topic "lint_repackage" am: 3903d401d0 am: 9c574a8575
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619574

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7576f269f572f458aa854e34e952b72a6cac7e97
2021-03-06 00:58:14 +00:00
Colin Cross 7b91027296 Merge "Exempt framework-res from UseApiFingerprint" am: cd2df5dec6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621782

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3b0835d9a048818245f1eced9e78b8fffc78ff37
2021-03-06 00:09:24 +00:00
Colin Cross 9c574a8575 Merge changes from topic "lint_repackage" am: 3903d401d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619574

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I983bfe5618a2a5aa781d2436191f25bf1734e20e
2021-03-06 00:08:46 +00:00
Colin Cross cd2df5dec6 Merge "Exempt framework-res from UseApiFingerprint" 2021-03-05 23:34:37 +00:00
Colin Cross 3903d401d0 Merge changes from topic "lint_repackage"
* changes:
  Remove lint outputs to prevent showing old lint results on error
  Make common dependencies of lint use restat
  Use repackaged lint binary
2021-03-05 23:34:14 +00:00
Sasha Smundak 5a27bdad7e Remove wired corpus name, use the one from the environment
Bug: 181825150
Test: run build/soong/build_kzip.bash, verify that the 'corpus' field
is still present and correct

Change-Id: I66cf44af9927d52c8fc014d93240d29c0e91c7ae
2021-03-05 15:23:04 -08:00
Jaewoong Jung d9119bc38f Merge "Clear remains of java.Dependency interface." am: 083e6cd267 am: a021326e92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id792437df796baa03e9f02fb24c9263342658edf
2021-03-05 22:35:34 +00:00
Jaewoong Jung a021326e92 Merge "Clear remains of java.Dependency interface." am: 083e6cd267
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3852d6b52605b6be40fe258bd56fe24e6b0ed81e
2021-03-05 21:54:34 +00:00
Jaewoong Jung 083e6cd267 Merge "Clear remains of java.Dependency interface." 2021-03-05 21:11:15 +00:00
Treehugger Robot 4cb095e8cb Merge "Correct fmt printf error in bazel_handler" am: b48f9aefea am: d8c28dfd69
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619139

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88e0f0ff9862f46c33bb3f5288652c11d8a84843
2021-03-05 19:57:34 +00:00
Colin Cross 2669e7edf0 Exempt framework-res from UseApiFingerprint
Generating the API fingerpring depends on framework-res, so the
fingerprint cannot be embedded into framework-res.  Hardcode an
exemption to UseApiFingerprint.

Bug: 181978889
Test: TARGET_BUILD_VARIANT=user UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true vendor/google/build/build_mainline_modules.sh
Change-Id: I621f36d5eb157dd97baa132ff109b4df791eedcc
2021-03-05 19:54:31 +00:00
Treehugger Robot d8c28dfd69 Merge "Correct fmt printf error in bazel_handler" am: b48f9aefea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619139

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaf74e8841adda51297bd68a949b921bb95939028
2021-03-05 18:44:20 +00:00
Paul Duffin 6d119b804c Fix mutator ordering issue in apex tests
Previously, the override mutators were being run before the prebuilt
mutators that did not match the runtime behavior. This change fixes
that ordering.

In the process it broke TestApexWithAppImportsPrefer. That test tries
to verify that an apex that depends on an android_app will use an
android_app_import if that is preferred. Unfortunately, it only worked
because of the incorrect order of the mutators.

The test worked before this change because the prebuilt mutators were
being run after the overridableModuleDepsMutator. That meant that any
dependencies added by that mutator onto source modules could be
replaced by the PrebuiltPostDepsMutator with the preferred prebuilt
module.

Switching the order to match the runtime meant that the prebuilt
mutators were run before the overrides so never had a chance to replace
the dependencies added by the overrides.

Bug: 181953909
Bug: 181974714
Test: m nothing
Change-Id: Ic98fdc29a63155174a3227e7e918b26f0a8763bb
2021-03-05 18:38:58 +00:00
Paul Duffin ea8a386346 Make error handlers treat any failures as fatal
A lot of existing tests that expect errors to be reported do not check
the returned result. This change treats failures of the error handler
in that situation as fatal.

The default error handler already behaved that way. The others did not.

FixtureExpectsAllErrorsToMatchAPattern uses
CheckErrorsAgainstExpectations and it was safe to just make that func
treat any unmatching errors as fatal as all the existing usages are at
the end of test functions.

FixtureExpectsAtLeastOneErrorMatchingPattern uses the
FailIfNoMatchingErrors function which is used in a number of places
(including CheckErrorsAgainstExpectations) that do not want to treat
a test failure as fatal. So, that was modified to return false if no
matching error was found and the error handler treated that as fatal.

Bug: 181070625
Test: m nothing
Change-Id: I6e4df53f93250348bc050d4ff098134e6314ae30
2021-03-05 18:20:33 +00:00
Paul Duffin 52323b5113 Avoid SetErrorHandler mutating FixtureFactory
A FixtureFactory is supposed to be immutable to allow them to be safely
shared but unfortunately the implementation of SetErrorHandler broke
that constraint. That made it very easy to mistakenly add an error
handler specific to a test to a shared factory breaking other tests
that use that factory.

This change causes SetErrorHandler to create a new instance of the
factory to avoid that.

Bug: 181070625
Test: m nothing
Change-Id: Ia5356a04189099c88880a2a521af29ab72560f30
2021-03-05 18:20:33 +00:00
Paul Duffin d6ceb8600c Clean up cc.RegisterRequiredBuildComponentsForTest()
Changes this function so it only registers components from the cc
package by pushing the call to genrule.RegisterGenruleBuildComponents()
down into those packages whose tests need it.

This will make it easier to migrate cc package tests to test fixtures
as the RegisterRequiredBuildComponentsForTest() no longer overlaps with
preparers from the genrule packages.

Bug: 181070625
Test: m nothing
Change-Id: Ic00c7e480dc738d7a88d038aca6ab95a1502a24a
2021-03-05 18:20:33 +00:00
Paul Duffin a560d5a91d Rename FixturePreparers to GroupFixturePreparers
FixturePreparers is a bad name for a method that creates a collection
of FixturePreparers for a couple of reasons:
* Conventionally it would be used as the name for []FixturePreparer if
  it is necessary to add behavior to that.
* There are many different types of collection, particularly when order
  matters.

Bug: 181070625
Test: m nothing
Change-Id: I55394ff369375dcac2d7b72e4d803a4818762d36
2021-03-05 18:20:33 +00:00
Treehugger Robot b48f9aefea Merge "Correct fmt printf error in bazel_handler" 2021-03-05 18:08:39 +00:00
Julien Desprez b216661e84 Revert "Revert "Attempt to run all java_test_host that look unit..."
Revert reland the change after tests have been fixed

Reason for revert: relanding after fixes
Reverted Changes:
I89fbce4d7:Revert "Exclude some tests for java_test_host onbo...
Iaa89f9b7e:Revert "Attempt to run all java_test_host that loo...

Change-Id: Idaa80b2d5a8d3ba026e33b453bd163a4e2d31118
2021-03-05 18:08:36 +00:00
Jaewoong Jung 62751102a9 Clear remains of java.Dependency interface.
Test: TreeHugger
Change-Id: If9dab2022a308b776d7ad760a61f0db97509b9b2
2021-03-05 14:57:51 +00:00
Paul Duffin 94f5e6d478 Merge "Reformat license code to comply with preupload checks" am: 279790a48a am: 79a2c4d119
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I907af15c01139df8cb60d097d155bd122399e41d
2021-03-05 09:56:00 +00:00
Paul Duffin 79a2c4d119 Merge "Reformat license code to comply with preupload checks" am: 279790a48a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I098c5846f77d7ef0e6f544179d63dd6681f96a6e
2021-03-05 09:17:47 +00:00
Paul Duffin 279790a48a Merge "Reformat license code to comply with preupload checks" 2021-03-05 08:51:49 +00:00
Treehugger Robot 0aa0afdfe2 Merge "Friendly error message on apex_available and min_sdk_version checks" am: 4a349ab66b am: 5bb26755f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia42eb7ea29401fc53c188ded76315072080b85cd
2021-03-05 05:57:35 +00:00
Julien Desprez 97b3107dbd Merge "Revert "Attempt to run all java_test_host that look unit tests"" am: bbfd5f5e7c am: f1fb4af6e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619801

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic27644feb15de79119e81edb4c1c69b6b6688b0d
2021-03-05 05:54:51 +00:00
Treehugger Robot 5bb26755f9 Merge "Friendly error message on apex_available and min_sdk_version checks" am: 4a349ab66b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1bf9ef6394eefb01ca629010824f71b53e5e5b20
2021-03-05 05:20:30 +00:00
Julien Desprez f1fb4af6e9 Merge "Revert "Attempt to run all java_test_host that look unit tests"" am: bbfd5f5e7c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619801

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I133ec8120d1e3e406fe6bf5c5c9fce220837c064
2021-03-05 05:08:04 +00:00
Treehugger Robot 4a349ab66b Merge "Friendly error message on apex_available and min_sdk_version checks" 2021-03-05 03:30:11 +00:00