Commit Graph

38602 Commits

Author SHA1 Message Date
Paul Duffin 6bd87750ae Merge "Add Errs to TestResult" 2021-03-06 08:46:38 +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 ebd1d8cd52 Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" am: b1778a42cb am: 77294d573e am: a0ad77e293
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621859

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If41cf6170ff2403a1952589209ffcdaac329abe3
2021-03-06 04:21:50 +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 997f27aa03 Fix nested properties in soong config structs
Fix recursing into nested properties when creating the structs for
affectable properties in soong config modules.

Fixes: 181156850
Test: Test_createAffectablePropertiesType
Change-Id: I4fb645d7e334977d0bbf192c3b43a7bba8289f49
2021-03-05 17:26:37 -08:00
Colin Cross 0f3c4a986f Merge "Exempt framework-res from UseApiFingerprint" am: cd2df5dec6 am: 7b91027296 am: 7cbf691298
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621782

MUST ONLY BE SUBMITTED BY AUTOMERGER

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2725e512318cb3a9f19abab82b11e394e639c3ee
2021-03-06 01:22:56 +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 42688a9945 Merge "Clear remains of java.Dependency interface." am: 083e6cd267 am: a021326e92 am: d9119bc38f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0be2ce1f1eda8b6a15f296899079bb70d04f7f2a
2021-03-05 23:19:07 +00: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
Linus Nilsson 2cb4b01f1f Add statslog_media dependency to media module.
To support logging transcoding metrics to westworld
a small auto generated wrapper lib is needed to
send structured data to statsd.

Bug: 179274112
Test: Will verify build with presubmit
Change-Id: I9b3a0b1825b7acb9859b92b9a52b3550e31ef1f1
2021-03-05 21:52:30 +00:00
Jaewoong Jung 083e6cd267 Merge "Clear remains of java.Dependency interface." 2021-03-05 21:11:15 +00:00
Treehugger Robot 2a2f492cca Merge "Correct fmt printf error in bazel_handler" am: b48f9aefea am: d8c28dfd69 am: 4cb095e8cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619139

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3871b1c7b58d210f53e625d24d611de2ed79cbb4
2021-03-05 20:39:21 +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
Colin Cross 2787e8e65e Support robolectric prebuilts in android_robolectric_test
The version of robolectric in external/robolectric-shadows is based
on 4.1 and is difficult to update.  Support using the prebuilt versions
in prebuilts/misc/common/robolectric, with the caveat that they won't
support the in-progress SDK version.

Bug: 181886851
Test: manual
Change-Id: Ie3a861cf6d637f97cf00212c02322f92c1043f0a
2021-03-05 19:22:30 +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 942481b3f5 Add Errs to TestResult
Makes the error handler a little cleaner.

Bug: 181070625
Test: m nothing
Change-Id: I0f9050a98346d7d214eed570957d9810aaf26def
2021-03-05 18:20:33 +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
Nicolas Geoffray 863f3b9fb4 Stop using '&' for class loader context.
Test: m
Bug: 132357300
Change-Id: I01a5008d5b84820f793c1c23fe2e4c4687cf4acf
2021-03-05 18:14:10 +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
Paul Duffin 5e85c665d0 Do not ignore error when writing environment file
Test: m nothing
Change-Id: I4281e22ae10a649b51b9fbed7f8c1554f18885b9
2021-03-05 17:46:29 +00:00
Hai Zhang 9bb022a4aa Allow PermissionController to set min_sdk_version to 30.
PermissionController is updatable since R, so its minimum SDK version
should be 30.

Bug: 174770904
Test: build
Merged-In: I5c98dc0053687bd4601ab06f6e092aeb851cdba7
Change-Id: I5c98dc0053687bd4601ab06f6e092aeb851cdba7
2021-03-05 17:46:25 +00:00
TreeHugger Robot 1d15b8f2d4 Merge "variable: Add header_libs to product_variables.arc" into sc-dev 2021-03-05 17:26:40 +00:00
Jaewoong Jung 62751102a9 Clear remains of java.Dependency interface.
Test: TreeHugger
Change-Id: If9dab2022a308b776d7ad760a61f0db97509b9b2
2021-03-05 14:57:51 +00:00
Jeongik Cha 555752f09e update apex/allowed_deps.txt
Bug: 150578172
Test: m
Change-Id: I0ea6b33c2d27081a5f0622edb0f5df4088a71455
2021-03-05 21:10:19 +09:00
Paul Duffin 214cbdada6 Merge "Reformat license code to comply with preupload checks" am: 279790a48a am: 79a2c4d119 am: 94f5e6d478
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1619699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib69709a3b9821f564055c125e9657d10d52f8715
2021-03-05 10:20:38 +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