Commit Graph

4330 Commits

Author SHA1 Message Date
Paul Duffin
044abfd9a1 Merge "Separate system modules tests into their own file" am: 8075291a94 am: 7c05abc397
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628000

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a4bff6fc543c1c378a834fb9a615c6689216859
2021-03-11 15:41:32 +00:00
Paul Duffin
2543e840af Merge "prebuilt_apis should create a java_system_modules_import" am: f18ff339a9 am: 08e8a82ebb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626518

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5228bb68a51f01cf94019f04ad89178220bb9095
2021-03-11 15:41:27 +00:00
Jaewoong Jung
41dea7a344 Merge "Populate baseline_file values." am: 48b8df14be am: 4bc4800ce7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I00cc4e320a9013689b7ef5e0f253379df8935d1b
2021-03-11 15:41:14 +00:00
Paul Duffin
df0b483089 Merge "Convert system modules tests to use fixtures" am: 6f688d03c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628001

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72ab39aa93ad79fd53f97ca3b3eb08ea327451e8
2021-03-11 15:21:42 +00:00
Paul Duffin
7c05abc397 Merge "Separate system modules tests into their own file" am: 8075291a94
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1628000

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I629d3459f4c2467233baadd891d6e11630900208
2021-03-11 15:21:32 +00:00
Paul Duffin
08e8a82ebb Merge "prebuilt_apis should create a java_system_modules_import" am: f18ff339a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1626518

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I920b5d2496f956ac41ba6a631c848445d7c36ffb
2021-03-11 15:21:18 +00:00
Jaewoong Jung
4bc4800ce7 Merge "Populate baseline_file values." am: 48b8df14be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia3586bc9e7bc9f8e31ec98c3fb021f3ad1f7d7cc
2021-03-11 15:20:56 +00:00
Paul Duffin
6f688d03c8 Merge "Convert system modules tests to use fixtures" 2021-03-11 15:11:20 +00:00
Paul Duffin
8075291a94 Merge "Separate system modules tests into their own file" 2021-03-11 15:10:54 +00:00
Paul Duffin
f18ff339a9 Merge "prebuilt_apis should create a java_system_modules_import" 2021-03-11 15:09:47 +00:00
Jaewoong Jung
48b8df14be Merge "Populate baseline_file values." 2021-03-11 15:04:52 +00:00
Paul Duffin
4f0a75abde Ensure java_system_modules_import uses prebuilts
Make sure that java_system_modules_import always depends on the
prebuilt by adding dependencies in the ComponentDepsMutator() method
which is called before prebuilts without a corresponding source are
renamed from prebuilt_<x> to <x>. That requires the prebuilt_ prefix
to be provided but it ensures that the dependencies are safe.

Similar logic also makes sure java_system_modules always depends on
the source module and not on a renamed prebuilt module.

Bug: 182402568
Test: m nothing
Change-Id: I30db95978f5d9b205951011edf40585ee36c0c4c
2021-03-11 09:40:02 +00:00
Paul Duffin
c52bea9555 Improve system modules tests
The previous approach of looking for substrings in the command that
matched the base name of the jar could not differentiate between
whether the jar was a prebuilt or a source as they both have the same
base name.

The tests also did not cover the case when there was both prebuilts
and source modules.

This change:
1. Checks that the inputs to the command come from the appropriate
   module.
2. Adds a mixed test.
3. Deduped the source and prebuilt module definitions.

The new test reveals the buggy behavior which will be fixed in a follow
up change.

Bug: 182402568
Test: m nothing
Change-Id: I384ecca097cbe3560e7589c23fb99c176a42fd9b
2021-03-11 09:39:18 +00:00
Paul Duffin
f23e346f6c Convert system modules tests to use fixtures
Bug: 182402568
Test: m nothing
Change-Id: I0535e60a692925b141e465d8e1ec92be21d54c88
2021-03-11 08:32:01 +00:00
Paul Duffin
db284be913 Separate system modules tests into their own file
java_test.go is getting too big.

Bug: 182402568
Test: m nothing
Change-Id: I9c3818f1d747a230fcb66687319a3a14d557a57c
2021-03-11 08:21:49 +00:00
Paul Duffin
d6c2a65211 prebuilt_apis should create a java_system_modules_import
Previously it was creating a java_system_modules which worked fine
because apart from the prebuilt nature the two are functionally
identical. However a follow up change will differentiate between them
which would break this code.

Bug: 182402568
Test: m nothing
Change-Id: Ifc13ce31235494e338d730c61a99d8887c5a2c5b
2021-03-11 08:01:19 +00:00
Paul Duffin
f7f65dafb4 Add prebuilt_boot_image and add boot_images to sdk
Bug: 177892522
Test: m nothing
Change-Id: I640359acd6840507f32d7034c97d4d1c7ff591e9
2021-03-11 07:24:26 +00:00
Jaewoong Jung
4bd1fc1763 Merge "Lineage properties support module references." am: 6df5e0307d am: c3df3c5396
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8541e1e2aa1e9866e7616167f3305e2cd9c53419
2021-03-11 02:19:57 +00:00
Colin Cross
72241f12c0 Merge "Add comment to lintPaths" am: 42e49979f2 am: 8aac2c3dd5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624661

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib48bcb25eb1b6eb49ace54675e9eab42300e103c
2021-03-11 02:19:00 +00:00
Colin Cross
9c78cb83d0 Propagate LANG environment variable to lint in RBE
Without LANG, lint's text output is ASCII instead of UTF-8, causing
differences between local and remote execution.

Bug: 181681346
Bug: 182415460
Test: m USE_RBE=true RBE_LINT=true
Change-Id: I0ad54aa731582c9b54abb80f50ba508c75992b91
2021-03-10 18:03:05 -08:00
Colin Cross
9b93af488b Default lint RBE to local exec strategy
Match other tools by defaulting to local exec strategy.

Also use the local absolute path when using the local exec strategy.

Bug: 181681346
Test: m USE_RBE=true RBE_LINT=true
Test: m USE_RBE=true RBE_LINT=true RBE_LINT_EXEC_STRATEGY=remote
Change-Id: I1d6d20ec69663b99d6d9af1d8e5e67b48a5cd050
2021-03-10 18:03:05 -08:00
Jaewoong Jung
c3df3c5396 Merge "Lineage properties support module references." am: 6df5e0307d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7fb218215e9b8c7395756ccbd78edf6674b259ad
2021-03-11 02:00:38 +00:00
Jaewoong Jung
6df5e0307d Merge "Lineage properties support module references." 2021-03-11 00:59:32 +00:00
Colin Cross
8aac2c3dd5 Merge "Add comment to lintPaths" am: 42e49979f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624661

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6f65aebc59148f74b9b603a6733bcb477ef4576c
2021-03-10 23:31:24 +00:00
Paul Duffin
05d6367813 Merge "Support test fixtures in java package" am: 29e98e5ede am: 1d58079c9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625388

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I04d2ad1baa81b48eb8e53e3adc42751faebf613c
2021-03-10 23:14:07 +00:00
Paul Duffin
1d58079c9c Merge "Support test fixtures in java package" am: 29e98e5ede
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625388

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I95df61b5ae8df324258623c760f9ece1c4a0c1e5
2021-03-10 23:05:24 +00:00
Colin Cross
42e49979f2 Merge "Add comment to lintPaths" 2021-03-10 22:55:03 +00:00
Paul Duffin
29e98e5ede Merge "Support test fixtures in java package" 2021-03-10 22:27:00 +00:00
Colin Cross
c6b8d7f70e Merge changes from topic "lint_rbe" am: 068f33f6cf am: d475665a61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621780

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib93088ac7ffae99efebbfd8dc372724d80bd77e0
2021-03-10 20:32:04 +00:00
Colin Cross
d475665a61 Merge changes from topic "lint_rbe" am: 068f33f6cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621780

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9f00672cd11d70f34cf283378c907a8b168715dc
2021-03-10 20:13:18 +00:00
Jaewoong Jung
75c7cead62 Delete defaultsFactory in java.go.
The factory function became obsolete a long time ago. The module
description text will be correctly extracted with this change.

Test: TreeHugger
Change-Id: If4eb936d34e5a71e6f298f53827a887f34af7cae
2021-03-10 11:41:50 -08:00
Colin Cross
068f33f6cf Merge changes from topic "lint_rbe"
* changes:
  Pass ANDROID_SDK_HOME to metalava so it doesn't write to ~/.android
  Support remoting lint commands with RBE
2021-03-10 18:13:31 +00:00
Colin Cross
ad22bc2995 Add comment to lintPaths
Test: none
Change-Id: Ia7db6e27fedd95df2ebfc573e35a44a93acb031b
2021-03-10 10:10:40 -08:00
Aaron Huang
0a19d6389a Add service-connectivity-pre-jarjar to legacy core platform list
This is a library pre jarjar version which still has dependencies
on legacy core platform APIs and this library will be inculded in
service-connectivity. Thus, this change replaces service-connectivity
with service-connectivity-pre-jarjar.

Bug: 177046265
Test: build pass
Change-Id: I1a84ff07318da03f368cbccb25b6cabebb2de403
Merged-In: I1a84ff07318da03f368cbccb25b6cabebb2de403
2021-03-10 22:29:52 +08:00
Paul Duffin
043f5e7881 Treat core_platform as stable unless module uses legacy
The sdk_version: "core_platform" refers to the stable core platform
unless the module is in the exception list. This change makes sure that
CheckStableSdkVersion() reflects that behavior.

Bug: 180399951
Test: m nothing
Change-Id: Ia0b1e13322352b87f5a3c6621e37f23ba637ffb6
2021-03-10 13:04:03 +00:00
Paul Duffin
95bdab4000 Support test fixtures in java package
Restructures the java package test setup code to create FixturePreparer
instances for setting up a test fixture and converts some tests to
use it.

The goal with this change is not to switch all the java tests over to
directly using the new model but instead to ensure that the majority of
the java tests run with the new model, to allow existing tests to
easily switch to the new model when needed and to allow dependent
packages to be switched to the new model.

Bug: 181070625
Test: m nothing
Change-Id: I1c9d96ddbc973aaf9733dcd7fa0479f79b0f471f
2021-03-10 10:13:09 +00:00
Nicolas Geoffray
a0acfa8b85 Merge "Reinstate the enforcement of stable core platform API usage" 2021-03-10 09:45:52 +00:00
Jaewoong Jung
1a97ee0b20 Populate baseline_file values.
Set baseline_file properties of droidstubs generated in sdk_libary.go to
incompatibilities modules auto-generated by prebuilt_api. This requires
prebuilt_api to generate the modules whether next_api_dir is set or not.

Test: TreeHugger
Bug: 180123247
Change-Id: I690604a8a54e9d9419f072a28a0c0e7734abbd85
2021-03-09 16:26:03 -08:00
Jaewoong Jung
1c1b6e6d95 Lineage properties support module references.
They should have had `android:"path"` tags attached so that users can
point them to filegroup modules.

Test: app_test.go & app_import_test.go
Bug: 182175153
Change-Id: I5580408488ffe5fc12c869cbfb7a468713dcbc96
2021-03-09 15:14:34 -08:00
Jaewoong Jung
f10cb18a20 Merge "Add additional_certificates to android_app_import." am: 05ebca4f7f am: 6ea8f69bc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622565

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ccbc3abbfad8807ca00f4fd27a23d975483f6b3
2021-03-09 15:44:34 +00:00
Jaewoong Jung
05ebca4f7f Merge "Add additional_certificates to android_app_import." 2021-03-09 14:55:24 +00:00
Ulyana Trafimovich
6afbccdbc8 Merge "Disable verify_uses_libraries check if dexpreopt is globally disabled." am: 35570c14ce am: 3d7489c1e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1615200

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bc1508470878ca1cdefe4978854642001d029ab
2021-03-09 10:06:19 +00:00
Ulyana Trafimovich
35570c14ce Merge "Disable verify_uses_libraries check if dexpreopt is globally disabled." 2021-03-09 08:40:23 +00:00
Jaewoong Jung
25ae8dec91 Add additional_certificates to android_app_import.
Bug: 182175153
Test: app_import_test,go
Change-Id: I467e98065945b59dcc574a18144756edccdea441
2021-03-08 17:37:46 -08:00
Colin Cross
6426ae5a73 Merge "Support robolectric prebuilts in android_robolectric_test" am: 7314fedd37 am: d5e78d1c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1621781

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c3d6e50e5c3968da29ed1f88198a5545aef0ee9
2021-03-08 20:09:31 +00:00
Colin Cross
7314fedd37 Merge "Support robolectric prebuilts in android_robolectric_test" 2021-03-08 19:08:10 +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
0805d4ebdd Merge "Clean up cc.RegisterRequiredBuildComponentsForTest()" 2021-03-06 08:43:56 +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
b1778a42cb Merge "Revert "Revert "Attempt to run all java_test_host that look unit..."" 2021-03-06 02:40:44 +00:00