Commit Graph

71599 Commits

Author SHA1 Message Date
Mohannad Farrag
7194de7bfd gn2bp: Add escape quotations as part of BaseActionSanitizer am: 60b377099f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325459

Change-Id: I4134896081f7f8c340b0c3252fe9703c57a6bc54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:30 +00:00
Mohannad Farrag
2cbf85be91 gn2bp: Add JniRegistrationGenerator get_cmd am: 291f567f86
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325458

Change-Id: I7339b1dfe8af33c4838ac2b8b59ca74f8b29165f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:28 +00:00
Mohannad Farrag
d92700c04b gn2bp: Add get_cmd logic. am: c739dda3f1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325457

Change-Id: I580abde11a308adf66b19b0cda280d59f2aa7151
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:25 +00:00
Mohannad Farrag
2134f2012b gn2bp: add get_cmd to BaseActionSanitizer am: d5515ca062
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325456

Change-Id: Id52c137a464da8195248291125759b2cdae5eee9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:23 +00:00
Mohannad Farrag
e431dfaa31 gn2bp: Remove redundant blueprint.add_module am: fa76dca684
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325455

Change-Id: Ic3808d5ee78a5b45acedf779bb329af69cbec78f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:21 +00:00
Mohannad Farrag
6e3e393627 gn2bp: Move response file to gn_utils am: a0e37c105f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325454

Change-Id: I252cadf2c2787490f4434998fe950e17460fffd3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:19 +00:00
Mohannad Farrag
8580e15786 gn2bp: Move replacing of response_file to Sanitizer am: 00ecfb5183
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325453

Change-Id: I2a8ef69b232c3fc23c9ccb90450ec25fc75b3020
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 19:30:17 +00:00
Mohannad Farrag
7f7c9b44dd 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
457bc02a7b 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
4b89a8275a 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
584613d745 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
60b377099f 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
291f567f86 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
c739dda3f1 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
2022-12-02 17:33:42 +00:00
Mohannad Farrag
d5515ca062 gn2bp: add get_cmd to BaseActionSanitizer
Test: update_results.sh
Change-Id: I054607965a7011b1fccb67b5e89744b86dce2345
2022-12-02 17:33:42 +00:00
Mohannad Farrag
fa76dca684 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
2022-12-02 17:33:41 +00:00
Mohannad Farrag
a0e37c105f 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
2022-12-02 17:33:41 +00:00
Mohannad Farrag
00ecfb5183 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
2022-12-02 16:59:49 +00:00
Mohannad Farrag
72f82a86fe Merge changes I119583b6,I00ae8f7d,I1b4033ae,I133dfdd7,Idc7a2ed2, ... am: fc8464d500
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2325328

Change-Id: I4fc66ff43da8085aecef673e41c211d850644c0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 12:29:45 +00:00
Mohannad Farrag
fc8464d500 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
2022-12-02 12:06:03 +00:00
Treehugger Robot
79a33ac6b6 Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage" am: 841b1f33d5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2324993

Change-Id: I5cd78e6e7259f9f2bdb2a35d6262e94f61441cf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 11:55:07 +00:00
Treehugger Robot
841b1f33d5 Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage" 2022-12-02 11:27:27 +00:00
Motomu Utsumi
9401996791 gn2bp: Move arg output from get_outputs to _sanitize_outputs
Test: ./update_results.sh
Change-Id: I119583b64373e2a3ed78358dddead857fd6f4006
2022-12-02 19:26:25 +09:00
Motomu Utsumi
805591d7d8 gn2bp: Move arg sanitizing from get_args to _sanitize_args
Test: ./update_results.sh
Change-Id: I00ae8f7d801c611aec1b8d279db81a372eb3b88d
2022-12-02 19:26:25 +09:00
Motomu Utsumi
cdb45eafe9 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
2022-12-02 19:26:25 +09:00
Motomu Utsumi
a91ade6394 gn2bp: Update is_header_generated in the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I133dfdd72cb35ed9e47e64ef84b5c2f66e28580e
2022-12-02 19:26:25 +09:00
Motomu Utsumi
1e028b8001 gn2bp: Update is_header_generated of MakeDafsaSanitizer
Test: ./update_results.sh
Change-Id: Idc7a2ed2f72a5c0b2f9c623603a30e0fcd3f52c9
2022-12-02 19:26:25 +09:00
Motomu Utsumi
9701d2f0ae gn2bp: Add MakeDafsaSanitizer
Test: ./update_results.sh
Change-Id: I6c18497ea0cfa1c28b44e2c80545b08fe34311ef
2022-12-02 19:26:25 +09:00
Motomu Utsumi
7db7583ba1 gn2bp: Add is_header_generated to the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I0ce8fa4cc9b483e9ae19a3383e4fe8d0ab5f4bf3
2022-12-02 19:26:25 +09:00
Motomu Utsumi
d22edf0b0d gn2bp: Remove unrequired hack for action_with_pydeps
Test: ./update_results.sh
Change-Id: Iee268ae92fa5f90d859b533304c102e3a17d04cf
2022-12-02 19:26:25 +09:00
Motomu Utsumi
242132378f gn2bp: Use the result of get_outputs as module.out
Test: ./update_results.sh
Change-Id: Ia3a1b2e8fd1beb71fe5778dc786422309730719a
2022-12-02 19:26:25 +09:00
Motomu Utsumi
d4f7264232 gn2bp: Add get_outputs to JniGeneratorSanitizer
Test: ./update_results.sh
Change-Id: I7416b18d4ed659158d44752e4143c13efacf0a80
2022-12-02 19:26:25 +09:00
Motomu Utsumi
b9ef35c954 gn2bp: Fix to use set for target.outputs
Test: ./update_results.sh
Change-Id: Ia5aff5ebcba3574c7b3871482a859e7fc2589ef4
2022-12-02 19:26:25 +09:00
Motomu Utsumi
5afd081a49 gn2bp: Add get_outputs to the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I242b68800bdcabe7cf955046e12ef9c112c0d321
2022-12-02 19:26:25 +09:00
Motomu Utsumi
1339932ba7 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
2022-12-02 19:26:25 +09:00
Motomu Utsumi
9752bd356c 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
2022-12-02 19:26:25 +09:00
Motomu Utsumi
8be8a266e5 gn2bp: Update the comment for value args and list args
Test: ./update_results.sh
Change-Id: I0f28041f0c6e83ff9dd20c74b0a4dbd684b3f2e0
2022-12-02 19:26:25 +09:00
Motomu Utsumi
d75b8b5d07 gn2bp: Update _is_value_arg
Test: ./update_results.sh
Change-Id: I55c016404533c9fb37e32e818dd47081ee2e82fa
2022-12-02 19:26:21 +09:00
Treehugger Robot
212016373e Merge changes I9bccc558,Ifd855571 am: fbef749cda
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2319858

Change-Id: I7ae6719f2f0b04576d1184ada42620611263841a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 10:06:10 +00:00
Hungming Chen
40c9fe1165 Test: separate common methods to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

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

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. No test operation is changed.

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I36d205bf6f2a8145d5ac63c620af7528765b22ab
2022-12-02 09:23:03 +00:00
Treehugger Robot
fbef749cda Merge changes I9bccc558,Ifd855571
* changes:
  Test: separate common variables to EthernetTetheringTestBase
  Test: decouple the tests which access class member variables directly
2022-12-02 09:15:42 +00:00
Aaron Huang
c5a05d1d8f 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
2022-12-02 16:04:55 +08:00
Hungming Chen
21308b5b2d 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
2022-12-02 07:18:43 +00:00
Mark
a542458c16 Wrap some IpServer commands
This is no-op change. Preparing for refactor.

Test: atest TetheringTests
Change-Id: I8fb67cbc95074e990074f08b5fe6afe7dfd28382
2022-12-02 04:48:00 +00:00
Patrick Rohr
82afe85d12 Merge changes I3ae20595,I24aaf62e,I763a5d30,I07270c9a,Ib91dfdd6, ... am: 19cc5a8e48
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2323458

Change-Id: I48c858bfedba0961c32a0c42c54d852fe4a6d3dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 03:39:23 +00:00
Aaron Huang
b54e96faed Merge "Make mMatchSubscriberIds as a NonNull variable" am: b4b8198b89
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2282318

Change-Id: Ibfd2bd976f3c1e246e53358680105bdbf88fb181
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 03:38:58 +00:00
Patrick Rohr
19cc5a8e48 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
2022-12-02 03:38:38 +00:00
Aaron Huang
b4b8198b89 Merge "Make mMatchSubscriberIds as a NonNull variable" 2022-12-02 03:08:14 +00:00
Paul Hu
6ae7bd860f Merge "Send MdnsServiceInfo on onServiceRemoved callback" am: 79e239eacb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2238115

Change-Id: Id2b3f1dc6be0cffbc2cdbe0dcb41b0334b540c2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 01:57:43 +00:00
Paul Hu
79e239eacb Merge "Send MdnsServiceInfo on onServiceRemoved callback" 2022-12-02 01:33:40 +00:00