Commit Graph

34133 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Paul Duffin
3c298a3725 Reformat license code to comply with preupload checks
Bug: 181070625
Test: m nothing
Change-Id: I0b7c8613fcb7bc4e96908e391f1e46a9168f2507
2021-03-04 22:35:29 +00:00
Julien Desprez
bbfd5f5e7c Merge "Revert "Attempt to run all java_test_host that look unit tests"" 2021-03-04 21:50:34 +00:00
Julien Desprez
1ab84fa433 Revert "Attempt to run all java_test_host that look unit tests"
Revert submission 1597083-java_test_host_default

Reason for revert: Getting ready for b/181888225 just in case
Reverted Changes:
I220551549:Attempt to run all java_test_host that look unit t...
I29dbbbf46:Exclude some tests for java_test_host onboarding

Change-Id: Iaa89f9b7e9ad72ed962cef285c70a6263e63ffd5
2021-03-04 21:08:36 +00:00
Colin Cross
5c113d13eb Remove lint outputs to prevent showing old lint results on error
The lint rules dumped the text output file to stdout on error.  If the
lint binary exited without updating the output file it would show old
results.

Remove the output files before running lint, and only dump the text
output file if it exists.

Bug: 181681346
Test: m lint-check
Change-Id: I4fa962b1212e8715f234912a9a5e049d5c1540e8
2021-03-04 10:01:34 -08:00
Colin Cross
00d93b143f Make common dependencies of lint use restat
Use restat for the api_versions.xml and annotations.zip dependencies
of lint so that frameworks/base changes don't always result in
rerunning lint on every module.

Bug: 181681346
Test: m lint-check
Change-Id: Ic6a540b41cf79b21441311a8baefe528a3d90d8b
2021-03-04 10:00:09 -08:00
Colin Cross
84f3dc1c9d Use repackaged lint binary
Lint references lint-classpath.jar, which does not contain any classes
by has a manifest that points to other jars for the classpath.  This
breaks dependency tracking during the build.  Use a lint tool that
is repackaged into a single jar.

Bug: 181681346
Test: m lint-check
Change-Id: I07d2b7404c18626e03c5af3ef5a75dd7f899cb0e
2021-03-04 09:56:15 -08:00
Makoto Onuki
f8a09af582 Merge "Remove myself from the OWNERS" am: e9d0de4932
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1615279

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a904d75d75106086fa81c8fd407ed0266bf2288
2021-03-04 17:46:50 +00:00
Makoto Onuki
e9d0de4932 Merge "Remove myself from the OWNERS" 2021-03-04 17:04:53 +00:00
Liz Kammer
15b04e2cbd Correct fmt printf error in bazel_handler
When running tests locally, it fails to build due to using the incorrect
formatting.

Test: go test soong test
Change-Id: Iccdc3fbc93e409d74f1b71d929dd9650492b401d
2021-03-04 09:45:21 -05:00
Lukacs T. Berki
f4c124f618 Make tests work again on Darwin. am: deba72161c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614816

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id671b831f791277e6c5520eb0fa458fa58bdbf41
2021-03-04 13:08:48 +00:00
Lukacs T. Berki
deba72161c Make tests work again on Darwin.
aosp/1609473 broke this by making originalEnv empty unless
InitEnvironment() is called, which doesn't happen in tests.

Bug: 181835672
Test: "m nothing" on Linux and Darwin.
Change-Id: I33f9cce65a9151e620e1dddafb62d4c599ed2cac
2021-03-04 10:54:50 +01:00
Lukács T. Berki
db9632fbd0 Merge "cd to / before running soong_build ." am: ddebd2c82a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609473

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If4936c514dbb38c68d075952d60a8801383eaf55
2021-03-04 07:58:47 +00:00
Lukács T. Berki
ddebd2c82a Merge "cd to / before running soong_build ." 2021-03-04 07:07:02 +00:00
Petri Gynther
3a54e1e1d5 Merge "Rename vendor-ramdisk to vendor_ramdisk" am: 7d3f2caec0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614008

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I057d6c211c2da36e07af71505e8cb33825ab6d9c
2021-03-04 05:23:57 +00:00
Petri Gynther
7d3f2caec0 Merge "Rename vendor-ramdisk to vendor_ramdisk" 2021-03-04 04:40:04 +00:00
Treehugger Robot
32da168930 Merge "init_rc and vintf_fragments appear in PackagingSpecs()" am: 6cfd3eeed3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If2f74ee19e7c907a2f8f1e5a2d0c7701f8d56a7a
2021-03-04 04:08:53 +00:00
Jiyong Park
767dbd9d3b Friendly error message on apex_available and min_sdk_version checks
1) suggest a fix at the end of the message
2) add new lines around the dependency path so that they are visually
separated from rest of the error message

Bug: N/A
Test: m with an intentional break
error: bionic/apex/Android.bp:32:1: module "com.android.runtime" variant "android_common_com.android.runtime_image": "libutils_headers" requires "libsystem_headers" that doesn't list the APEX under 'apex_available'.

Dependency path:
           via tag apex.dependencyTag: { name:executable payload:true}
    -> crash_dump{os:android,image:,arch:arm_armv8-a,sdk:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:staticLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:false explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libtombstoned_client_static{os:android,image:,arch:arm_armv8-a,sdk:,link:static,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:staticLibraryDependency Order:normalLibraryDependency wholeStatic:true reexportFlags:true explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libcutils{os:android,image:,arch:arm_armv8-a,sdk:,link:static,asan:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:headerLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:false explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libutils_headers{os:android,image:,arch:arm_armv8-a,sdk:,asan:,apex:apex10000}
           via tag cc.libraryDependencyTag: { Kind:headerLibraryDependency Order:normalLibraryDependency wholeStatic:false reexportFlags:true explicitlyVersioned:false dataLib:false ndk:false staticUnwinder:false makeSuffix: skipApexAllowedDependenciesCheck:false excludeInApex:false}
    -> libsystem_headers{os:android,image:,arch:arm_armv8-a,sdk:,asan:,apex:apex10000}

Consider adding "com.android.runtime" to 'apex_available' property of "libsystem_headers"

Change-Id: I09f92c3086ea433780133a33ba0ad73baee6dc41
2021-03-04 13:07:36 +09:00
Julien Desprez
e4e279ec9e Merge "Attempt to run all java_test_host that look unit tests" am: ce45b73070
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597083

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieddf9035c5ea19c743a140076227d55c0fd735cc
2021-03-04 04:02:40 +00:00
Treehugger Robot
6cfd3eeed3 Merge "init_rc and vintf_fragments appear in PackagingSpecs()" 2021-03-04 02:10:37 +00:00
Julien Desprez
ce45b73070 Merge "Attempt to run all java_test_host that look unit tests" 2021-03-04 02:00:58 +00:00