Commit graph

19140 commits

Author SHA1 Message Date
easoncylee
5bcff5d1fd Add test_mainline_modules to the auto-gen test config(AndroidJUnitTest only).
To support parameterized mainline modules in Test Mapping, we plan to
add a new parameter called test_mainline_modules in build system to
auto-generate the test config based on the parameter.

For detailed information: go/test-mapping-mainline-gcl
(search for auto-generated pattern)

Bug: 155238134
Test: add "test_mainline_modules: [some.apk]" to TetheringTests,
and build the modules, confirm the parameterized option is added
in the test config.

Change-Id: I41ba8749ce46da62db402a8b8a555d4874e1cfc0
2020-05-15 12:50:48 +08:00
Colin Cross
2bdf0da9e7 Merge "Revert "enforce sdk_version for JNI libs for updatable APKs"" 2020-05-13 01:26:25 +00:00
Jooyung Han
cc928d9059 Revert "enforce sdk_version for JNI libs for updatable APKs"
This reverts commit 98c4750f39.

Reason for revert: broken builds

Change-Id: Icd3a9e226ff8ff288b682757cded9f43069ebc5e
2020-05-13 01:22:56 +00:00
Treehugger Robot
1852b586bf Merge "enforce sdk_version for JNI libs for updatable APKs" 2020-05-13 00:57:34 +00:00
Treehugger Robot
c81f967ddd Merge "Add support for the remote execution of Abi links." 2020-05-12 21:35:43 +00:00
Stephen Hines
7871416eec Default to zero-initialization instead of pattern.
Bug: http://b/154169005
Test: Built blueline and ran some CTS tests.
Change-Id: Ie5e45619096cdcd0b52d01ece65e7f0233b2a3c8
2020-05-12 01:10:38 -07:00
Treehugger Robot
b67b9a416e Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." 2020-05-12 04:35:17 +00:00
Treehugger Robot
e72da7f63c Merge "Add sourcepath to inputs of remoteable metalava action." 2020-05-12 04:15:16 +00:00
Yo Chiang
bcaea49d24 Merge "Register ALL_MODULES subvars with my_register_name" 2020-05-12 03:09:20 +00:00
Treehugger Robot
0a5dae117b Merge "Defer \n quoting generatedContents until creating the ninja rule" 2020-05-12 02:44:38 +00:00
Paul Duffin
1110827b3f Defer \n quoting generatedContents until creating the ninja rule
Previously, when writing to generatedContents \n characters were
quoted (replaced with \\n) so as to allow them to be preserved through
ninja/rsp/bash and were unquoted (replaced \\n with \n) just before
redirecting to the output file. That meant that any code which wanted
to access the contents for other purposes, e.g. testing had to unquote
\\n.

This change moves the quoting to be part of the code that generates the
ninja rule which simplifies any other code that has to access the
contents.

Without quoting the generated Android.bp files are not formatted
properly, are all on one line and completely unreadable.

Bug: 156286550
Test: m art-module-sdk and check generated Android.bp file to make sure
      it is properly formatted.
Change-Id: I768c3b96ed08a3daf251730e2a10d9d72338c49a
2020-05-11 22:59:25 +01:00
Ramy Medhat
0a5c8dea01 Add sourcepath to inputs of remoteable metalava action.
Test: presubmit
Change-Id: Idd77abddac0a676302226eb62883c74d5d7489af
2020-05-11 16:49:37 -04:00
Anton Hansson
432f75c61a Merge "Fix API lint copy command" 2020-05-11 17:54:08 +00:00
satayev
ecea813997 Merge "Introduce app -deps-info." 2020-05-11 16:51:30 +00:00
Artur Satayev
1111b84822 Introduce app -deps-info.
Similar to APEX-deps-info, app deps info produces two lists with
transitive dependencies.

Bug: 149622332
Test: m NetworkStack-deps-info
Change-Id: Ic6d94df3b7b4be5afe328a0abe768beee1a58362
Exempt-From-Owner-Approval: previous patch approved.
2020-05-11 16:51:06 +00:00
Treehugger Robot
a586fecea6 Merge "java_sdk_library: Path extraction from deps depend on tag" 2020-05-11 14:47:21 +00:00
Anton Hansson
3361a294c0 Fix API lint copy command
The space after the backtick prevents it working when copy-pasting it
into the shell.

Test: create lint error => m => cp/pasted command runs successfully
Change-Id: I42b8b60d01dcaed34dbde0390eb1691d656a32cf
2020-05-11 15:40:30 +01:00
Treehugger Robot
d2e4822774 Merge "Expand SystemApi annotation for generating system api" 2020-05-11 14:24:36 +00:00
Paul Duffin
c878250d3f java_sdk_library: Path extraction from deps depend on tag
Previously, the information that the java_sdk_library extracted from
its child dependencies was determined purely by the type of the
dependency and whether it had a tag of the appropriate type. The actual
tag itself was ignored. That worked but was a little fragile as it
relied on there being no overlap between the types of the dependencies
or if there was overlap on the order in which the dependencies were
processed and the dependency types were checked to ensure that the
correct information was collected.

This change makes the information that is extracted dependent on the
tag that is used. That makes the behavior much more robust and also
simplifes the follow up change which may get the stubs source and API
files from separate droidstubs invocations.

Changes:
* A func field is added to the scopeDependencyTag that is supplied with
  a dependency from which to extract the information and scopePaths
  into which the information will be stored.
* Each scopeDependencyTag instance supplies its own function.
* Various items are renamed to more closely reflect what they actually
  do. e.g. the apiFileTag is renamed to stubsSourceAndApiTag field
  because if provides access to both api file and stubs source.

Test: m checkapi
Bug: 155164730
Change-Id: I4e1861ea67f441f2948a0d7d7053ab0b1169955f
2020-05-10 23:42:02 +01:00
Paul Duffin
6e7ecbf972 Switch java_sdk_library_import to use SetDefaultableHook()
Ensure consistency with java_sdk_library.

Bug: 155295806
Test: m checkapi
Change-Id: I074e7c865b6b52c7bcf568da3342d8772623ce4f
2020-05-10 19:33:36 +01:00
Paul Duffin
9f10bbf4cf Merge "java_sdk_library: Specify visibility of stubs modules" 2020-05-10 18:31:56 +00:00
Paul Duffin
2346e960a9 Merge "Retry: Fix snapshot of a host/device cc_library with stubs" 2020-05-09 07:51:27 +00:00
Paul Duffin
ad5191885d Merge "Retry: Adds support for 'ignored-on-host'" 2020-05-09 07:33:50 +00:00
Paul Duffin
385378bf99 Merge "Retry: Detect invalid arch specific properties in snapshot" 2020-05-09 07:33:35 +00:00
Treehugger Robot
9c3a1291e2 Merge "Add error checking and tests for jni_uses_sdk_apis and jni_uses_platform_apis" 2020-05-09 02:13:42 +00:00
Colin Cross
3c007704c7 Add error checking and tests for jni_uses_sdk_apis and jni_uses_platform_apis
Check that jni_uses_sdk_apis and jni_uses_platform_apis are consistent
with sdk_version, and add tests that they select the right variant.

Bug: 154665579
Test: app_test.go
Change-Id: I544a4f881ba16dacd7e74cd480c095091b3cf667
2020-05-08 16:55:14 -07:00
Paul Duffin
7a1f7f32ab Retry: Fix snapshot of a host/device cc_library with stubs
Change since last attempt: Disable test that breaks on darwin.

Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.

Bug: 155628860
Test: m nothing
Change-Id: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
2020-05-08 22:32:08 +01:00
Paul Duffin
c459f89fb4 Retry: Adds support for 'ignored-on-host'
Adds a filter mechanism that can exclude property values from being
included in the common value extraction. That is needed to prevent the
snapshot mechanism from generating invalid output for properties that
are ignored on host (and have their values cleared) and which are not
tagged with `android:"arch_variant"`.

Changes:
* Updates the documentation of SdkMemberType to explain what effect
  the 'ignored-on-host' tag has.
* Adds some tests for this new mechanism.

Bug: 155628860
Test: m nothing
Change-Id: Ibafdb6e921ba5abe505bd8a91ca5a1d9c9b5d0cb
2020-05-08 22:32:02 +01:00
Paul Duffin
864e1b45db Retry: Detect invalid arch specific properties in snapshot
Previously, the snapshot code did not know whether a specific property
could be arch specific or not and assumed that they all were which
meant that it could generate snapshots containing arch specific values
for properties that are not arch specific and so would fail when
unpacked.

This change requires arch specific fields in SdkMemberProperties to be
tagged as such using `android:"arch_variant"` (just as in module input
property structures). Any property without that must have properties
that are common across all variants.

Bug: 155628860
Test: m nothing
Change-Id: I3df60f0b53ba02ec2c55a80c7da058eac5909d26
2020-05-08 22:31:56 +01:00
Greg Kaiser
a71fe150fa Merge changes from topic "revert-1302576-NGVCIVIIJO"
* changes:
  Revert "Detect invalid arch specific properties in snapshot"
  Revert "Adds support for 'ignored-on-host'"
  Revert "Fix snapshot of a host/device cc_library with stubs"
2020-05-08 19:18:40 +00:00
Greg Kaiser
e509447c93 Revert "Detect invalid arch specific properties in snapshot"
Revert submission 1302576

Bug: 156054601
Reason for revert: Presumed root cause of build break.
Reverted Changes:
Ifc8116e11:Detect invalid arch specific properties in snapsho...
I7ebd33307:Adds support for 'ignored-on-host'
I167b47a13:Fix snapshot of a host/device cc_library with stub...

Change-Id: Id7eba0bdde5c579e10e9b42d94a7cfab5f34995f
2020-05-08 19:12:34 +00:00
Greg Kaiser
e08e03fa96 Revert "Adds support for 'ignored-on-host'"
Revert submission 1302576

Bug: 156054601
Reason for revert: Presumed root cause of build break.
Reverted Changes:
Ifc8116e11:Detect invalid arch specific properties in snapsho...
I7ebd33307:Adds support for 'ignored-on-host'
I167b47a13:Fix snapshot of a host/device cc_library with stub...

Change-Id: I2a7ac0ef0232177eefc26542c11dc675d6f4cab2
2020-05-08 19:12:34 +00:00
Greg Kaiser
ad913d56ac Revert "Fix snapshot of a host/device cc_library with stubs"
Revert submission 1302576

Bug: 156054601
Reason for revert: Presumed root cause of build break.
Reverted Changes:
Ifc8116e11:Detect invalid arch specific properties in snapsho...
I7ebd33307:Adds support for 'ignored-on-host'
I167b47a13:Fix snapshot of a host/device cc_library with stub...

Change-Id: Ibccce5286605bb71c6be3b3550ba86d8b7e24fa7
2020-05-08 19:12:34 +00:00
Liz Kammer
50fc599bbc Merge "Add androidmk support for runtime_resource_overlay" 2020-05-08 18:07:01 +00:00
Paul Duffin
4911a89181 java_sdk_library: Specify visibility of stubs modules
Adds two new properties to specify the visibility of the stubs modules
(source and library) created by the java_sdk_library. Excludes
visibility property from being inherited when creating the module so it
can be properly specified by copying across the relevant property.

Test: m checkapi
Bug: 155164730
Change-Id: Iffdd9f191ff0d74646356ac577560cc38efdd790
2020-05-08 18:03:31 +01:00
Paul Duffin
f49f431c33 Merge "java_sdk_library: Add support for module_lib API surface" 2020-05-08 17:02:37 +00:00
Paul Duffin
d34bc09aa1 Merge "java_sdk_library: Control API surfaces generated" 2020-05-08 17:01:50 +00:00
Daniel Norman
ad521eeb14 Merge "Removes $(PRODUCT_OUT)/misc_info.txt on installclean." 2020-05-08 16:22:59 +00:00
Paul Duffin
0d543640d5 Expand SystemApi annotation for generating system api
Metalava apparently normalizes the SystemApi annotation that was
previously used to the form that this change uses so this is
effectively a no-op. However, this does make this code more
self-consistent and also matches the form that is used in the framework
defaults for the mainline modules.

Test: m checkapi
Bug: 155164730
Change-Id: Ic99b7333730ed8b918d8af72ae7bd6a851c2093a
2020-05-08 12:33:27 +01:00
Yo Chiang
ef2d489043 Register ALL_MODULES subvars with my_register_name
Replace ALL_MODULES.$(LOCAL_MODULE) with
ALL_MODULES.$(my_register_name).

Test: TH presubmit build pass
Change-Id: Ic1fb859ae458d1c67cc1d3699199ef36476088db
2020-05-08 16:17:09 +08:00
Jiyong Park
18bbde1615 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" 2020-05-08 08:11:24 +00:00
Jiyong Park
5b75774004 Revert "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 45b90e79c9.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Change-Id: I0df395eaa4cd856ab466925031b21aa4adc3af08
Test: m on full-eng
2020-05-08 07:55:47 +00:00
Paul Duffin
8f265b9ab9 java_sdk_library: Add support for module_lib API surface
Adds api scope for the module_lib and adds that to the list of all
all available scopes. The scope is generated if and only if the
api_surfaces property contains "module_lib".

No other changes are needed as the generation of the APIs is completely
driven by the allApiScopes array and the information in its contained
apiScope structures.

Test: m checkapi
Bug: 155164730
Change-Id: I7769af6823badca8715a270f86cf53b4e954b7df
2020-05-08 07:51:00 +01:00
Paul Duffin
3375e35d99 java_sdk_library: Control API surfaces generated
Adds a per scope set of properties that allows explicit control over
the API surfaces generated.

Previously, the term active was used to determine whether it was
generated but that was a little abstract and unclear so has been
replaced by generated.

Test: m nothing
Bug: 155164730
Change-Id: I7539d89618b61f6b9d1a4b60cc3f9614b157f0d9
2020-05-08 07:51:00 +01:00
Ramy Medhat
808594c668 Add support for the remote execution of Abi links.
Test: built crosshatch userdebug with RBE_ABI_LINKS=1
Change-Id: Idb4e15b59878af4a98d9a594127c21deff669e16
2020-05-07 23:55:03 -04:00
Jiyong Park
06938a0a16 Merge changes from topic "no_staticlinking_to_stubs"
* changes:
  Prevent statically linking to a lib providing stable C APIs
  Add GetPathString
2020-05-08 02:12:58 +00:00
Daniel Norman
b8e7f81af6 Removes $(PRODUCT_OUT)/misc_info.txt on installclean.
misc_info.txt's build rule does not contain inputs to tell it to
refresh on an incremental build, so incremental builds (even after
installclean) were reusing this file.

With this change, misc_info.txt is removed by installclean so that an
incremental build generates the file fresh.

Test: # misc_info.txt exists; m installclean; # misc_info.txt gone
Bug: 155930200
Change-Id: Ia319925dad26f98049a988ee1ceb1e20db621353
2020-05-07 23:48:30 +00:00
Paul Duffin
af6fbcbcca Merge changes I167b47a1,I7ebd3330,Ifc8116e1
* changes:
  Fix snapshot of a host/device cc_library with stubs
  Adds support for 'ignored-on-host'
  Detect invalid arch specific properties in snapshot
2020-05-07 21:58:14 +00:00
Liz Kammer
74151f2c8c Add androidmk support for runtime_resource_overlay
Test: androidmk_test.go
Bug: 148673525
Change-Id: I25c277c52b91e9308e15d92364b5504a8f556c9f
2020-05-07 14:40:57 -07:00
Treehugger Robot
cf23ab4cd8 Merge "Skip dexpreopting android_test_import modules" 2020-05-07 21:37:37 +00:00