Commit graph

67,222 commits

Message SHA1
gn2bp: Add get_srcs to the Sanitizer
Test: ./update_results.sh
Change-Id: If6b24297727801d4f2a80000524e9a61d5976e97

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
80fa0b0e8d
gn2bp: Fix to use target sources and inputs
`a or b` does not return the union of set a and set b.
Test: ./update_results.sh

Change-Id: I8ba2f2a96e036bab362cbb7015cc6da048e12024

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
047831e03a
gn2bp: Move _sanitize_inputs to JniRegistrationGeneratorSanitizer
Test: ./update_results.sh
Change-Id: Id88b88c9d463ab54e8e89bb62579802ea322e355

Motomu Utsumi   commited 2022-12-05 18:49:49 +09:00
07027f6e85
gn2bp: Add _sanitize_inputs and get_inputs
Test: ./update_results.sh
Change-Id: Iae106bf2e474a5f10d7a77ee94b9dfe3d5ee607e

Motomu Utsumi   commited 2022-12-05 18:49:45 +09:00
735a5a4121
gn2bp: Fix version script character escaping
* It seems that an apostrophe is required for the command to be executed successfully

Test: update_results.sh && m cronet_aml_components_cronet_android_cronet
Change-Id: Ide44e8be9d7db6894cb5bf1bcf0c3e4d67c2a228

Mohannad Farrag   authored and   Motomu Utsumi   commited 2022-12-05 12:09:49 +09:00
25697348e8
Merge "Ensure calling package and UID synchronized while calling dump()"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-12-05 00:48:25 +00:00
2217cd03f4
Merge "Import translations. DO NOT MERGE ANYWHERE"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-04 17:53:24 +00:00
80ca8e0f8f
Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iac76895633eb6af61834b84b75c2312c857dfefa

Bill Yi   commited 2022-12-03 13:48:54 -08:00
c80ab04c22
Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I660b8f5400b7f35f8feb2a471fd44067d0efa73b

Bill Yi   commited 2022-12-03 13:48:01 -08:00
39d2e0d416
Merge "Wrap some IpServer commands"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 21:48:05 +00:00
767e5b6df6
Merge "Remove usages of java_api_finder"
Cole Faust   authored and   Gerrit Code Review   commited 2022-12-02 19:31:31 +00:00
65b2ec8855
gn2bp: Add get_name to BaseActionSanitizer
* This would help when creating a module for both java and c++. Where the java can get a different name depending on the Sanitizer used.

Test: update_results.sh
Change-Id: I9d1180b98a00c14d4c9851041801c6fd646d4739

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
7f7c9b44dd
gn2bp: Add JavaJniGeneratorActionSanitizer
* This is a copy of the JniGeneratorActionSanitizer class but supposed to be for the java version where it removes the .h files.

Test: update_results.sh
Change-Id: I9fd38e75b57a9a7a25cd2a9b6caea117f88a2f05

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
457bc02a7b
gn2bp: Create java_genrule directly from create_action_module
* Instead of going through creating `java_genrule` through `create_modules_from_target`. It's better to just create the genrules from `create_action_module` directly.

Test: update_results.sh
Change-Id: I35d1bf8854b5724390ea776c01e54452fcbaaba6

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
4b89a8275a
gn2bp: Delete get_args
This shouldn't be exposed as it doesn't benefit the module in any way. The module can call `get_cmd` to generate a suitable `cmd`.

Test: update_results.sh
Change-Id: I671b176ca748fc2d956d738199f0d7390a29dea9

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
584613d745
gn2bp: Add escape quotations as part of BaseActionSanitizer
* Quotations escaping is a universal operation that would benefit every subclass. Moving this up in the BaseActionSanitizer to cover for the `java_genrule` errors.

Test: update_results.sh
Change-Id: If6a7296b85170294b596566da413332fe395913f

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
60b377099f
gn2bp: Add JniRegistrationGenerator get_cmd
* jni_registration_generator action has extra cmds that needs to be appeneded to the original cmd like generation of the java files.
* Moved `NEWLINE` to the top of the file.

Test: update_results.sh
Change-Id: I92cec28786472ef31b514698422e100885714250

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
291f567f86
gn2bp: Add get_cmd logic.
* Move the creation of cmd implementation to `BaseActionSanitizer`. This is important because we don't want to expose the target args as this will change the original target.

Test: update_results.sh
Change-Id: I4932408d8add345ed8e480b0dc2cd65e73d54b09

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
c739dda3f1
gn2bp: add get_cmd to BaseActionSanitizer
Test: update_results.sh
Change-Id: I054607965a7011b1fccb67b5e89744b86dce2345

Mohannad Farrag   commited 2022-12-02 17:33:42 +00:00
d5515ca062
gn2bp: Remove redundant blueprint.add_module
* This is already called in `create_action_module`. JniGenerator_Java will be added again in an upcoming CL.

[I think create_action_module shouldn't call that in the first place.]

Test: update_results.sh
Change-Id: I409fb37a135c2249f777d47b97c1565552d2b7ab

Mohannad Farrag   commited 2022-12-02 17:33:41 +00:00
fa76dca684
gn2bp: Move response file to gn_utils
* This is a GN-specific flag that should live in gn_utils as it might be used in the future when converting to Bazel.

Test: update_results.sh
Change-Id: If870f757cf3ee57a00c571947a7ffea18a7db55d

Mohannad Farrag   commited 2022-12-02 17:33:41 +00:00
a0e37c105f
gn2bp: Move replacing of response_file to Sanitizer
* This was affecting the original target args as it was being executed after setting target.args . So this is a step in maintaining the original target as a read-only object.

Test: update_results.sh
Change-Id: I6852dbecbd1ce304af091f3e4d00e0d698cd53f8

Mohannad Farrag   commited 2022-12-02 16:59:49 +00:00
00ecfb5183
Merge changes I119583b6,I00ae8f7d,I1b4033ae,I133dfdd7,Idc7a2ed2, ...
* changes:
  gn2bp: Move arg output from get_outputs to _sanitize_outputs
  gn2bp: Move arg sanitizing from get_args to _sanitize_args
  gn2bp: Add sanitize API to the BaseActionSanitizer
  gn2bp: Update is_header_generated in the BaseActionSanitizer
  gn2bp: Update is_header_generated of MakeDafsaSanitizer
  gn2bp: Add MakeDafsaSanitizer
  gn2bp: Add is_header_generated to the BaseActionSanitizer
  gn2bp: Remove unrequired hack for action_with_pydeps
  gn2bp: Use the result of get_outputs as module.out
  gn2bp: Add get_outputs to JniGeneratorSanitizer
  gn2bp: Fix to use set for target.outputs
  gn2bp: Add get_outputs to the BaseActionSanitizer
  gn2bp: Fix arg normalization and remove hack in the VersionSanitizer
  gn2bp: Normalize args by for loop instead of comprehension
  gn2bp: Update the comment for value args and list args
  gn2bp: Update _is_value_arg

Mohannad Farrag   authored and   Gerrit Code Review   commited 2022-12-02 12:06:03 +00:00
fc8464d500
Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 11:27:27 +00:00
841b1f33d5
gn2bp: Move arg output from get_outputs to _sanitize_outputs
Test: ./update_results.sh
Change-Id: I119583b64373e2a3ed78358dddead857fd6f4006

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
9401996791
gn2bp: Move arg sanitizing from get_args to _sanitize_args
Test: ./update_results.sh
Change-Id: I00ae8f7d801c611aec1b8d279db81a372eb3b88d

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
805591d7d8
gn2bp: Add sanitize API to the BaseActionSanitizer
Currently, Sanitizer modifies target attributes in the get APIs.
However, some sanitize methods are not idempotent (e.g.
_add_location_tag).
Also, get API could depends on the same target attributes, at this
point, get_srcs and get_tool_files will depends on target.sources and
target.inputs.
This could easily cause issue by calling non idempotent sanitize methods
multiple times.
This CL introduces sanitize API to prevent this issue.
sanitize API modifies all the required target attributes and other get
APIs only read the sanitized target attributes.
This makes it easy to guarantee that sanitization is done only once.

Test: ./update_results.sh
Change-Id: I1b4033ae161284ef07153b56e05217b8557b4cba

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
cdb45eafe9
gn2bp: Update is_header_generated in the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I133dfdd72cb35ed9e47e64ef84b5c2f66e28580e

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
a91ade6394
gn2bp: Update is_header_generated of MakeDafsaSanitizer
Test: ./update_results.sh
Change-Id: Idc7a2ed2f72a5c0b2f9c623603a30e0fcd3f52c9

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
1e028b8001
gn2bp: Add MakeDafsaSanitizer
Test: ./update_results.sh
Change-Id: I6c18497ea0cfa1c28b44e2c80545b08fe34311ef

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
9701d2f0ae
gn2bp: Add is_header_generated to the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I0ce8fa4cc9b483e9ae19a3383e4fe8d0ab5f4bf3

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
7db7583ba1
gn2bp: Remove unrequired hack for action_with_pydeps
Test: ./update_results.sh
Change-Id: Iee268ae92fa5f90d859b533304c102e3a17d04cf

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
d22edf0b0d
gn2bp: Use the result of get_outputs as module.out
Test: ./update_results.sh
Change-Id: Ia3a1b2e8fd1beb71fe5778dc786422309730719a

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
242132378f
gn2bp: Add get_outputs to JniGeneratorSanitizer
Test: ./update_results.sh
Change-Id: I7416b18d4ed659158d44752e4143c13efacf0a80

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
d4f7264232
gn2bp: Fix to use set for target.outputs
Test: ./update_results.sh
Change-Id: Ia5aff5ebcba3574c7b3871482a859e7fc2589ef4

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
b9ef35c954
gn2bp: Add get_outputs to the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I242b68800bdcabe7cf955046e12ef9c112c0d321

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
5afd081a49
gn2bp: Fix arg normalization and remove hack in the VersionSanitizer
There are cmd diffs in Android.bp.swp but it is verified the updated
cmds works.

Test: ./update_results.sh
Change-Id: Iaf916f9de12b18b4e5402fcccd2b154f72a6ac8d

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
1339932ba7
gn2bp: Normalize args by for loop instead of comprehension
Upcoming CL will make this normalization a bit more complex, this CL is
a preparation for that.

Test: ./update_results.
Change-Id: I8248c68d30b21682f5521435f85cd555033b51c6

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
9752bd356c
gn2bp: Update the comment for value args and list args
Test: ./update_results.sh
Change-Id: I0f28041f0c6e83ff9dd20c74b0a4dbd684b3f2e0

Motomu Utsumi   commited 2022-12-02 19:26:25 +09:00
8be8a266e5
gn2bp: Update _is_value_arg
Test: ./update_results.sh
Change-Id: I55c016404533c9fb37e32e818dd47081ee2e82fa

Motomu Utsumi   commited 2022-12-02 19:26:21 +09:00
d75b8b5d07
Merge changes I9bccc558,Ifd855571
* changes:
  Test: separate common variables to EthernetTetheringTestBase
  Test: decouple the tests which access class member variables directly

Treehugger Robot   authored and   Gerrit Code Review   commited 2022-12-02 09:15:42 +00:00
fbef749cda
Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage
Currently, NET_CAPABILITY_TEMPORARILY_NOT_METERED traffic is
counted as unmetered data usage, and "mobile data usage"
settings screen shows metered data usage which means it doesn't
include TEMPORARILY_NOT_METERED traffic. However, some carriers
show TEMPORARILY_NOT_METERED data usage in customer's bill which
would be confusing if the data usage in the device shows different
results. Thus, revert the change to avoid confusing.

Bug: 183776809
Test: FrameworksNetTests
Change-Id: I4ef25095462adf30b1ecf82134996739f167930d

Aaron Huang   commited 2022-12-02 16:04:55 +08:00
c5a05d1d8f
Test: separate common variables to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

Changes:
1. Separate common variables from EthernetTetheringTest
   to EthernetTetheringTestBase.
Before:
  EthernetTetheringTest

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. Separate EthernetTetheringTest from aosp/2319857

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I9bccc558dc8b955055a2927a1a600afd399b264f

Hungming Chen   authored and   Nucca Chen   commited 2022-12-02 07:18:43 +00:00
21308b5b2d
Wrap some IpServer commands
This is no-op change. Preparing for refactor.

Test: atest TetheringTests
Change-Id: I8fb67cbc95074e990074f08b5fe6afe7dfd28382

Mark   authored and   Mark Chien   commited 2022-12-02 04:48:00 +00:00
a542458c16
Merge changes I3ae20595,I24aaf62e,I763a5d30,I07270c9a,Ib91dfdd6, ...
* changes:
  gn2bp: Generate a copy of 'cronet_jni_registration' for java
  gn2bp: Fix args formatting for java_cpp_enum.py script
  gn2bp: Move 'sanitize_version_filepath' to base class
  gn2bp: Create `java_genrule` from java actions
  gn2bp: Convert java_actions to `java_group`
  gn2bp: Remove redundant checks

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-12-02 03:38:38 +00:00
19cc5a8e48
Merge "Make mMatchSubscriberIds as a NonNull variable"
Aaron Huang   authored and   Gerrit Code Review   commited 2022-12-02 03:08:14 +00:00
b4b8198b89
Merge "Send MdnsServiceInfo on onServiceRemoved callback"
Paul Hu   authored and   Gerrit Code Review   commited 2022-12-02 01:33:40 +00:00
79e239eacb
gn2bp: Generate a copy of 'cronet_jni_registration' for java
cronet_jni_registration is a cc_genrule that produces both C++ header file and java jar. So this copies the cronet_jni_registration cc module and tweak it to fit the java_library

Test: m cronet_aml_components_cronet_android_cronet
Change-Id: I3ae20595c84ab32ae33268e2af79aead3f2d35c4

Mohannad Farrag   commited 2022-12-01 17:58:37 +00:00
c1a0d619fc
gn2bp: Fix args formatting for java_cpp_enum.py script
Test: None
Change-Id: I24aaf62e7cc8ba94f5f43d3069689d5ed4579f73

Mohannad Farrag   commited 2022-12-01 17:58:32 +00:00
b73ce0fbaa
gn2bp: Move 'sanitize_version_filepath' to base class
This method is needed for another subclass so it's better to move it to the base class and change the name.

Test: None
Change-Id: I763a5d30d9b35b585914f1c8dbb2d5989e1d55d6

Mohannad Farrag   commited 2022-12-01 17:58:29 +00:00
8fa90658f5