Commit Graph

17231 Commits

Author SHA1 Message Date
Colin Cross
2e8290cfc7 Merge "Move ImageMutator after archMutator" am: e2f3b5dfe5
am: a129b29c76

Change-Id: Ia9f65e3a66041486036c2a5bf9e585dae8f61502
2019-12-06 16:49:30 -08:00
Colin Cross
a129b29c76 Merge "Move ImageMutator after archMutator"
am: e2f3b5dfe5

Change-Id: Ibf2ef2e4b2f119b6bd04a54cf00ab2d099ce7627
2019-12-06 16:46:29 -08:00
Treehugger Robot
e2f3b5dfe5 Merge "Move ImageMutator after archMutator" 2019-12-07 00:37:30 +00:00
Jeff Sharkey
a5ac8e73f6 Merge "Overridden APEX doesn't contribute to the file contexts" am: e2e4a5dd56
am: 76991e9429

Change-Id: I2e0d2430ea74c2e5520ba125a553a037bc1ca947
2019-12-06 15:12:07 -08:00
Jeff Sharkey
76991e9429 Merge "Overridden APEX doesn't contribute to the file contexts"
am: e2e4a5dd56

Change-Id: If8a688b89f38aa22a0c31507331b1c910ba98779
2019-12-06 15:09:06 -08:00
Jeff Sharkey
e2e4a5dd56 Merge "Overridden APEX doesn't contribute to the file contexts" 2019-12-06 23:02:01 +00:00
Elliott Hughes
e4dd3eb114 Merge "Enable -Wpragma-pack warnings as errors." am: b5d11197d3
am: d06667fc1a

Change-Id: I8554f3d8758265dd8e5e5423e0f68d3b32140e11
2019-12-06 14:23:26 -08:00
Elliott Hughes
d06667fc1a Merge "Enable -Wpragma-pack warnings as errors."
am: b5d11197d3

Change-Id: I4fa37cd5e85080646b1339e5ca014d396c2da9c0
2019-12-06 14:16:26 -08:00
Elliott Hughes
b5d11197d3 Merge "Enable -Wpragma-pack warnings as errors." 2019-12-06 22:07:20 +00:00
Colin Cross
ae6c5207cc Move ImageMutator after archMutator
Move the ImageMutator to be registered just after the archMutator
in preparation for moving it between osMutator and archMutator.
Requries updating variants in a few tests that now run the
ImageMutator.

Bug: 142286466
Test: no change to build.ninja
Test: all soong tests
Change-Id: Ia9d2a7bc0e225bedec3c9a83ea04f471a931bf47
2019-12-06 12:37:14 -08:00
Jeongik Cha
b06fdee4b9 Merge "Link type checking for java_library" am: f3c24c12ef
am: eff8478327

Change-Id: I677dcf5c75db8c2bb3fe845ab0969510fcf9fa9f
2019-12-06 11:17:56 -08:00
Jeongik Cha
eff8478327 Merge "Link type checking for java_library"
am: f3c24c12ef

Change-Id: I1630cf20beec882d5a6aec8189d56f6b1fe45c39
2019-12-06 11:13:54 -08:00
Treehugger Robot
f3c24c12ef Merge "Link type checking for java_library" 2019-12-06 18:59:48 +00:00
Dan Willemsen
e8a8906cfe Merge "Add sharding support to multiproduct_kati" am: ad1997eebc
am: a87aecec69

Change-Id: Id23f47a63790eb8f912597f6b9f3f89df1c1755e
2019-12-06 09:48:42 -08:00
Dan Willemsen
a87aecec69 Merge "Add sharding support to multiproduct_kati"
am: ad1997eebc

Change-Id: Iedbf9bd8751dece3f62e88003b8e62a835d89279
2019-12-06 09:46:41 -08:00
Dan Willemsen
ad1997eebc Merge "Add sharding support to multiproduct_kati" 2019-12-06 17:40:23 +00:00
Ulyana Trafimovich
5ab05089b4 Merge "Pass correct --image argument to oatdump." am: a4f02412a1
am: 4c1df60960

Change-Id: I764f6e9e9a522b36d6de75c130a653331461efd7
2019-12-06 09:15:02 -08:00
Ulyana Trafimovich
4c1df60960 Merge "Pass correct --image argument to oatdump."
am: a4f02412a1

Change-Id: I2a799616d99584105df7ba03ab1dbef3c4e6fcf7
2019-12-06 09:11:02 -08:00
Ulyana Trafimovich
a4f02412a1 Merge "Pass correct --image argument to oatdump." 2019-12-06 16:55:39 +00:00
Paul Duffin
2a60ae81bc Separate out module type specific test config am: d835daaade
am: cef37ba4ee

Change-Id: I73fd07f4569ab8e2d76c2dd044ec65d8955d203f
2019-12-06 08:49:18 -08:00
Paul Duffin
cef37ba4ee Separate out module type specific test config
am: d835daaade

Change-Id: I7d80cfcedf4e31fc584c4af16ac4835c01f1ca3f
2019-12-06 08:47:17 -08:00
Paul Duffin
d835daaade Separate out module type specific test config
Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I71433a7c89dfae4c27537f1f66bd677cf9fba0b3
2019-12-06 16:13:58 +00:00
Paul Duffin
4fe2c14a9b Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594 am: 3a7caaa80c
am: f44ca6b363

Change-Id: Ieed3aa6bedfdec3eaab4d2f2e8f21d7c6b0577f8
2019-12-06 08:01:25 -08:00
Paul Duffin
4ce6f5b667 Merge "Use static build rules in snapshot generation" am: 7467a714b0
am: eeaa413714

Change-Id: I54141d3740d8d5f3a2d2246f3bb2f8278497023f
2019-12-06 07:59:39 -08:00
Paul Duffin
f44ca6b363 Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594
am: 3a7caaa80c

Change-Id: Ib0ee79a0bc6d6cc15e9fe8620d4d2461f18b2779
2019-12-06 07:58:05 -08:00
Paul Duffin
eeaa413714 Merge "Use static build rules in snapshot generation"
am: 7467a714b0

Change-Id: I2ee0d433e3ac586103c931295fea5d807156617f
2019-12-06 07:57:39 -08:00
Treehugger Robot
3a7caaa80c Merge changes Ia7dbcd41,I93140450,I4d3fe18f,Ib00870dd,I10203594
* changes:
  Organize sdk member properties
  Extract the cc and java sdk related tests out into their own file
  Improve testing of sdk snapshot generation
  Separate sdk testing infrastructure from sdk tests
  Parameterize the sdk member processing
2019-12-06 15:55:24 +00:00
Paul Duffin
7467a714b0 Merge "Use static build rules in snapshot generation" 2019-12-06 15:52:00 +00:00
Jeongik Cha
e403e9e8dc Link type checking for java_library
Link type checking for java_library has not been working unintentionally.
So turn on link type checking for these types.

And also add tests for link type checking.

Bug: 145799020
Test: cherry-pick aosp/1182522 and check if build fails
Test: m nothing and there is no error(soong unittest)

Change-Id: Ifc347f657885de1028ac0076ddd103c0387b597a
2019-12-07 00:45:02 +09:00
Anton Hansson
b44f66a9fc Revert "Move odexes of non-system apps into system_other" am: d57bd3c84f
am: 1297ecfea6

Change-Id: Iae32520482ba92e564b06aecbfd9acc773e374dd
2019-12-06 07:28:57 -08:00
Anton Hansson
1297ecfea6 Revert "Move odexes of non-system apps into system_other"
am: d57bd3c84f

Change-Id: I9f319c484164e0636db08b0afd36e9bdf834244e
2019-12-06 07:27:01 -08:00
Anton Hansson
d57bd3c84f Revert "Move odexes of non-system apps into system_other"
This reverts commit 12b8d427c7.

Bug: 142537657
Test: No
Change-Id: Iefd882ec11c060877671f5bf0f2429ba4d811f8b
Merged-In: Iefd882ec11c060877671f5bf0f2429ba4d811f8b
2019-12-06 13:42:25 +00:00
Ulya Trafimovich
163664a548 Pass correct --image argument to oatdump.
This was broken after CL:
  Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826
..which split boot image into primary and extension.
The argument to oatdump was not updated properly.

The old form before the split was:

  --image=out/soong/generic_x86/dex_bootjars/system/framework/boot.art

The new form after the split is:

  --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art

Test: lunch aosp_x86-userdebug && m dump-oat

Test: Manually inspect build command to make sure correct image
  location is used:

  $ fgrep -e 'oatdump' $ANDROID_BUILD_TOP/out/soong/build.ninja | egrep -e '--image[^ ]*' -o
  --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art

Change-Id: I54a5146c404aefb6eaeadbe3e9363db935ecad86
2019-12-06 13:42:21 +00:00
Paul Duffin
a6e737b078 Organize sdk member properties
Grouping in alphabetical order by package and then by name within the
package should minimize conflicts when making changes.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: Ia7dbcd41ce8b8dd8675a90b1b6868fcaeaf72ee4
2019-12-06 12:16:59 +00:00
Paul Duffin
a80fdec00d Extract the cc and java sdk related tests out into their own file
Makes it easier for multiple people to work on different areas without
conflicts.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I93140450c0b049946a9d0432225bccff82f5a873
2019-12-06 12:16:59 +00:00
Paul Duffin
c3c5d5e351 Improve testing of sdk snapshot generation
Adds TestHelper to provide general test helper functionality for use by
any test.

Adds testSdkResult, composed with TestHelper that encapsulates the
result of processing and sdk {..} definition and provides specialized
support for testing the build rules.

Dedups the analysis of the sdk build rules, and improves it to extract
more information, and in different forms. That is represented by the
snapshotBuildInfo struct.

Adds a CheckSnapshot() method which checks the snapshot for a specified
sdk version. It takes a list of functions that can each perform a check
on a specific facet of the supplied snapshotBuildInfo.

Methods are provided for tests to use to check the following facets:
* Generated Android.bp contents.
* Copy rules
* Merge zip inputs

This approach makes it possible for each test to customize what is
being checked without either duplicating functionality, causing a
proliferation of specialized forms of the CheckSnapshot method for
different types of tests or adding arguments for every possible check
that any test would need which would lead to lots of churn to existing
tests when new arguments are added.

The main testing improvement is for CheckSnapshot() to actually try and
load the Android.bp that is generated. In order to do that it was
necessary to create a mock filesystem populated with information from
the build rules, i.e. the destination files from every Cp command as
well as the destination directory from every repackage zip command.

That helps detect a number of sources of errors:
* Failing to copy a file/directory that is mentioned in the generated
  Android.bp file.
* Invalid properties.
* Invalid format of the .bp file.
* Integrity issues within the .bp file.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I4d3fe18f86698186d18e7e8b32d2e319183f7f0c
2019-12-06 12:16:59 +00:00
Paul Duffin
82d90438be Separate sdk testing infrastructure from sdk tests
Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: Ib00870ddefc4c1dd9e42ca594e6ebe8e24c42e05
2019-12-06 12:16:59 +00:00
Paul Duffin
1387957727 Parameterize the sdk member processing
Extracts the type specific functionality into the SdkMemberType
interface which has to be implemented by each module type that can
be added as a member of the sdk. It provides functionality to add
the required dependencies for the module type, check to see if a
resolved module is the correct instance and build the snapshot.

The latter was previously part of SdkAware but was moved because
it has to be able to process multiple SdkAware variants so delegating
it to a single instance did not make sense.

The custom code for handling each member type specific property,
e.g. java_libs, has been replaced with common code that processes
a list of sdkMemberListProperty struct which associates the
property (name and getter) with the SdkMemberType and a special
DependencyTag which is passed to the SdkMemberType when it has to add
dependencies.

The DependencyTag contains a reference to the appropriate
sdkMemberListProperty which allows the resolved dependencies to be
grouped by type.

Previously, the dependency collection methods would ignore a module if
it was an unsupported type because they did not have a way of
determining which property it was initially listed in. That meant it
was possible to add say a droidstubs module to the java_libs property
(and because they had the same variants) it would work as if it was
added to the stubs_sources property. Or alternatively, a module of an
unsupported type could be added to any property and it would just be
ignored.

However, the DependencyTag provides information about which property
a resolved module was referenced in and so it can detect when the
resolved module is of the wrong type and report an error. That check
identified a bug in one of the tests where the sdk referenced a
java_import module (which is not allowed in an sdk) instead of a
java_library module (which is allowed). That test was fixed as part
of this.

A list of sdkMemberListProperty structs defines the member properties
supported by the sdk and are processed in order to ensure consistent
behaviour.

The resolved dependencies are grouped by type and each group is then
processed in defined order. Within each type dependencies are grouped
by name and encapsulated behind an SdkMember interface which includes
the name and the list of variants.

The Droidstubs and java.Library types can only support one variant and
will fail if given more.

The processing for the native_shared_libs property has been moved into
the cc/library.go file so the sdk package code should now have no type
specific information in it apart from what is if the list of
sdkMemberListProperty structs.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I10203594d33dbf53441f655aff124f9ab3538d87
2019-12-06 12:16:59 +00:00
Paul Duffin
375058f67d Use static build rules in snapshot generation
It is easier to extract information out of static build rules than it
is out of custom build rules built using the builder as the former
provides access to the in/out and args separate from the rule whereas
the latter only provides access to in/out.

Also, cleans up some warnings that appear in Intellij.

There is a lot of duplication in the testing code. That will be
resolved in a follow up change.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I973bc0c90b0affd84487f1b222dd3e6c22c07ec0
2019-12-06 12:16:53 +00:00
Jiyong Park
b80bcbae27 Merge "apex_available is defaultable" am: cea93afe76
am: f8bde14a30

Change-Id: I32be935ffb9726c372d84edc1521cbe7b4cf0680
2019-12-05 20:33:07 -08:00
Jiyong Park
f8bde14a30 Merge "apex_available is defaultable"
am: cea93afe76

Change-Id: Iff09b7c9fc51747883a70b88117cdc8e623ebe52
2019-12-05 20:31:04 -08:00
Treehugger Robot
cea93afe76 Merge "apex_available is defaultable" 2019-12-06 04:23:37 +00:00
Dan Willemsen
9609ad9c21 Add sharding support to multiproduct_kati
This is so that we can split the build_test build on large branches into
multiple builds, each testing a subset of the products.

Test: m blueprint_tools  (runs the go unit tests)
Test: build/soong/build_test.bash --only-config
      vs
Test: build/soong/build_test.bash --only-config --shard-count=2
Test: build/soong/build_test.bash --only-config --shard-count=2 --shard=2

Change-Id: I40ccc1aa477bc0ffa74ff564d155068509be18f0
2019-12-05 19:54:40 -08:00
Ivan Lozano
450180fedf Merge "Exclude dirs from binder interface whitelisting" am: 1fdb0b55a5
am: cc9c86c35e

Change-Id: Ib828eaea74e66f54251a44ea390019ab2180032c
2019-12-05 18:33:27 -08:00
Ivan Lozano
cc9c86c35e Merge "Exclude dirs from binder interface whitelisting"
am: 1fdb0b55a5

Change-Id: I4cb503b3aa804f8ffd9e0ca0deeafc96abb1504d
2019-12-05 18:29:28 -08:00
Ivan Lozano
1fdb0b55a5 Merge "Exclude dirs from binder interface whitelisting" 2019-12-06 02:25:10 +00:00
Jiyong Park
a9d97c9e98 Merge "Fix: vendor and odm are restricted to use public platform properties" am: 337cd8e493
am: 80b1dbe558

Change-Id: I77d0406039aef3d8b38b4248d276bbb20b729a0e
2019-12-05 18:06:55 -08:00
Jiyong Park
80b1dbe558 Merge "Fix: vendor and odm are restricted to use public platform properties"
am: 337cd8e493

Change-Id: I04004cae3d6ee11eb4cd359a395a50b6493a6575
2019-12-05 18:04:54 -08:00
Treehugger Robot
337cd8e493 Merge "Fix: vendor and odm are restricted to use public platform properties" 2019-12-06 02:00:11 +00:00
Colin Cross
4d2bbc7b05 Merge "Add CUJ tests" am: 6cfd3f0319
am: 617d508800

Change-Id: I4ce80765a464f9a70dc2425e0d6f7d79d6466b32
2019-12-05 17:26:07 -08:00