Commit graph android_packages_modules_Co.../tests/unit/Android.bp
Message SHA1
Merge "[MS59.2] Add unit test for NetworkStatsDataMigrationUtils" am: bfdd0f3c3c am: 9d39295472 am: 63b0335dae
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1958907

Change-Id: Ic46d1472184faea9af7e6361b6e15a0ececed171

Junyu Lai   authored and   Automerger Merge Worker   commited 2022-01-27 09:46:12 +00:00
1f00085fa3
Merge "[MS59.2] Add unit test for NetworkStatsDataMigrationUtils"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-27 09:20:10 +00:00
bfdd0f3c3c
Merge "Set exclude_kotlinc_generated_files to false explicitly since kotlin reflection is used in some Connectivity test cases kotlin code." am: c7231f3e79 am: 42872abcee am: 6203a5cb4c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1950403

Change-Id: Ia11b7f4b58e6f7b2f47ce1a3b92fd61cca431487

Wei Li   authored and   Automerger Merge Worker   commited 2022-01-27 01:01:09 +00:00
82f81a3406
Set exclude_kotlinc_generated_files to false explicitly since kotlin reflection is used in some Connectivity test cases kotlin code.
Property "exclude_kotlinc_generated_files" is recently added to exclude some kotlinc generated files that are not needed if kotlin reflection is not used. Currently it defaults to false since there are test failures(b/213966211) which is in FullScoreTest#testToString and FullScoreTest#testMinMaxPolicyConstants that uses kotlin reflection and fails if exclude_kotlinc_generated_files defaults to true. By setting explicitly exclude_kotlinc_generated_files to false on tests like FullScoreTest#testToString, we will be able to finally default this property to true so the kotlinc generated files can be removed for most modules that don't need them.
Bug: 204888276
Bug: 213966211
Test: atest
FrameworksNetTests: com.android.server.connectivity.FullScoreTest
Change-Id: I4ed2d27c27841cb7127f669c8db34c90b4a41b1f

Wei Li   commited 2022-01-26 18:25:23 +00:00
8a177f694a
[MS59.2] Add unit test for NetworkStatsDataMigrationUtils
Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: Ia6e8aec9a828072a2a1e63bec600c2e20d3699b3

junyulai   authored and   Junyu Lai   commited 2022-01-26 16:53:06 +00:00
a1bb3a36cd
Merge changes from topic "libnetworkstats" am: e1f8ad4d59 am: f1d14732f9 am: 9eaab00310
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1958140

Change-Id: I0d61424323e289125260fd6e51adc270d209d6c2

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-01-26 00:40:01 +00:00
3a8e312c23
Merge changes from topic "libnetworkstats"
* changes:
  Rename libnetdbpf to libnetworkstats
  Copy libnetdbpf from system/net to tethering module

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-25 23:52:06 +00:00
e1f8ad4d59
Merge "[MS67.2] Modify tests for registerUsageCallback" am: 3f9584bfda am: fec250f525 am: 5367f0aa57
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1958145

Change-Id: If09620589c4f04b643ccdcd3d70922a347ab6d0c

Junyu Lai   authored and   Automerger Merge Worker   commited 2022-01-25 02:07:44 +00:00
87080981c0
Merge "[MS67.2] Modify tests for registerUsageCallback"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-25 01:23:45 +00:00
3f9584bfda
Merge "Add unit test for BpfInterfaceMapUpdate" am: d512ec646c am: a2d92ecd83 am: 4c5e078f7d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1956062

Change-Id: I2e00ca1138bc428ee71cfaef7ba0590bad815894

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-01-24 19:40:45 +00:00
ad4a09ee79
[MS67.2] Modify tests for registerUsageCallback
Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: Ia4ff535cd703807516d65b582727684cbb670360

junyulai   commited 2022-01-24 18:59:23 +08:00
f8a1d3e5e6
Rename libnetdbpf to libnetworkstats
Two reason for renaming:
1. Avoid module name collision in sc-mainline-prod branch.
2. The libnetdbpf was misnamed before.

Bug: 202086915
Test: atest libnetworkstats_test FrameworksNetTests
      ConnectivityCoverageTests FrameworksNetSmokeTests
      CtsAppOpsTestCases
Change-Id: I87fcf4b1a9d58780a45743a9aa91b9b936e54266

Ken Chen   commited 2022-01-24 11:53:59 +08:00
f426b2b287
Add unit test for BpfInterfaceMapUpdate
Bug: 215095957
Test: atest FrameworkNetTests

Change-Id: I92d45e5a606f466ce42504629cb3f87fd9e25d22

markchien   commited 2022-01-21 23:34:25 +08:00
adf119a8ed
Merge "Build framework-connectivity-tiramisu library"
Paul Hu   authored and   Gerrit Code Review   commited 2022-01-20 03:02:56 +00:00
a77cad355b
Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
Ignore-AOSP-First: Other commits has merged conflict.
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436

paulhu   authored and   Paul Hu   commited 2022-01-19 11:05:41 +00:00
182e483ff6
Merge "Rename libbpf to libbpf_bcc" am: e44ea016e1 am: 7bf5e61c37 am: 05d00b50fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1906032

Change-Id: Ia0bba1c182fe43b01126e88f86f97c9c09163e59

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-12-17 01:30:27 +00:00
e48a86422a
Merge "Rename libbpf to libbpf_bcc"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-12-17 00:37:05 +00:00
e44ea016e1
Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436

paulhu   commited 2021-12-17 00:04:24 +08:00
802ab9760f
Merge "[MS07.2] Move NetworkStatsCollection/IdentitySet into frameworks" am: 7577131341 am: a9656625d2 am: bb49fe4bef
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895330

Change-Id: Id03f0efb4d052fd2da6bfd3d50bbb9a94cd299da

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-12-10 19:35:17 +00:00
23ec69be0f
[MS07.2] Move NetworkStatsCollection/IdentitySet into frameworks
These files are needed for the data migration util system Api
interfaces. Thus, they need to be moved into frameworks folder.

This change also set the @IgnoreUpTo annotation to S, since
these tests are testing purely platform code on S- devices which
is not really necessary for MTS. Also the tests are still covered
by the unit tests, since they are always verifying HEAD.

Test: TH
Bug: 197717846
Change-Id: I93c19b4860864c724be9f9f889ee2173f4605198

Junyu Lai   commited 2021-12-09 08:43:16 +00:00
e9710f0918
Rename libbpf to libbpf_bcc
This is to prevent a name collision with "upstream"
libbpf (external/libbpf) which is built using the same name.

Bug: 203823368
Test: m FrameworksNetTests
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I9a009493fe0482967ab1f92516514715cfd457d6

Connor O'Brien   commited 2021-12-07 23:05:24 +00:00
e0a64bb50c
Remove unused service and test dependencies am: f96ecf2708 am: e03f77170a am: 7d865f3e10
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895317

Change-Id: I22260179985637d82e20b346786bed44148e5dc2

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-11-19 16:27:47 +00:00
d1ed21007a
Remove unused service and test dependencies
Nothing uses StateMachine in service-connectivity, and
FrameworksNetTestsLib pulled a lot of unused dependencies with
services.core and services.net.

Remove unused dependencies. This helps measure code coverage more
accurately.

Bug: 207020032
Test: atest ConnectivityCoverageTests
Change-Id: I39857865594a3263c4b1deeda23312c8e4f86a77

Remi NGUYEN VAN   commited 2021-11-19 21:14:39 +09:00
f96ecf2708
Merge "Enable/disable FrameworksNetTests" am: d1ed1cb8b7 am: 045f47bc31 am: 3820c8b69c am: c502fa51d4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1843117

Change-Id: Ic342b4ecb4541c1e58200112dc5bc092b9ab8f2f

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-10-04 08:46:40 +00:00
e75927b122
Merge "Enable/disable FrameworksNetTests" am: d1ed1cb8b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1843117

Change-Id: Ida093c6792bed45d5f65e3ea0e567eb30de74807

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-10-04 08:07:21 +00:00
045f47bc31
Merge "Enable/disable FrameworksNetTests"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-10-04 07:53:09 +00:00
d1ed1cb8b7
Enable/disable FrameworksNetTests
Currently, there are some test for classes that are not in
connectivity module. If the platform code has a new change
that the test depends on it, then the test cannot verify the
behavior since the change does not exist in module branch.

This change moves the test for non-module classes out of
FrameworksNetTestsLib so that it doesn't go into coverage tests.
Then add those tests to FrameworksNetTests and use a variable
to enable/disable FrameworksNetTests which could minimize merge
conflicts.

Bug: 201265286
Test: make FrameworksNetTests

Change-Id: Ia9669da2c4d79054710e7f4173bc960e3f77f45a

Aaron Huang   commited 2021-10-01 19:29:50 +08:00
1ed8affa72
Modify Nsd{Service,Manager}Test to conform to its change
(clean cherry-pick from downstream branch)
Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Merged-In: I3cf658498bef5755dcb01127a94fff913b6e6298

Change-Id: I3cf658498bef5755dcb01127a94fff913b6e6298

Luke Huang   authored and   Remi NGUYEN VAN   commited 2021-09-13 10:18:04 +09:00
df75378ad4
Merge "Remove unused libbacktrace library." am: f7e6b7f424 am: 341de04dee am: 1b8a6843d6 am: d577354b20
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1807719

Change-Id: I60ae26b6754657709c9acb1969640becb3707a5b

Christopher Ferris   authored and   Automerger Merge Worker   commited 2021-09-02 22:21:22 +00:00
a0d72de861
Merge "Remove unused libbacktrace library." am: f7e6b7f424
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1807719

Change-Id: I7781fb81bfe78760334c5cc9301da505b9202d8b

Christopher Ferris   authored and   Automerger Merge Worker   commited 2021-09-02 21:38:38 +00:00
341de04dee
Remove unused libbacktrace library.
Bug: 120606663

Test: Builds.
Change-Id: I733defd03670b01a30c4be5742498d62db7a9b6b

Christopher Ferris   commited 2021-08-24 15:57:29 -07:00
2b63a2f92a
Merge "Add overlay options for no internet notifications" am: 4f39cacbc3 am: aca228c07a am: f51a0ded84
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1782433

Change-Id: I77ab8f2aa7ae9a18d4f619c3905bc13084ab557f

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-08-04 08:08:43 +00:00
fdfa1572ff
Merge "Add overlay options for no internet notifications" am: 4f39cacbc3 am: aca228c07a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1782433

Change-Id: I87238b54c517a4efb11bca6e23cc2484b66f217e

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-08-04 08:08:20 +00:00
f51a0ded84
Add overlay options for no internet notifications
Add an option to display the no internet dialog directly instead of
showing a notification when the notification would have been high
priority (typically when the network was explicitly selected). This is
disabled by default, but allows device manufacturers to use a slightly
more disruptive UX to ensure that the user is aware that the network has
no connectivity, and can take action.

Also add an option to show the same notification as "no internet"
instead of the "partial connectivity" notification. This is also
disabled by default, but allows device manufacturers to use the "no
internet" text if they feel that "partial connectivity" text is hard
to understand for the user.

Bug: 193847396
Test: atest NetworkNotificationManagerTest
Change-Id: Ib5bd74d8cf973bf70d373dd63648c178fae0ebae

Remi NGUYEN VAN   commited 2021-08-04 11:23:03 +09:00
5dc6ca0318
Merge "Modify Nsd{Service,Manager}Test to conform to its change" into sc-dev am: 3c20df39d0 am: c504df3890
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15320525

Change-Id: I9cf3cc5a4cf661f9a4571934d3e26b15c7a96837

Luke Huang   authored and   Automerger Merge Worker   commited 2021-07-22 03:31:07 +00:00
37834ab195
Modify Nsd{Service,Manager}Test to conform to its change
Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Change-Id: I3cf658498bef5755dcb01127a94fff913b6e6298
Ignore-AOSP-First: To avoid the side effect caused by automerger.

Luke Huang   commited 2021-07-21 08:02:26 +00:00
952a55c62d
Add connectivity coverage tests
The coverage tests will allow measuring code coverage for all
Connectivity+Tethering code.

This is a combination of the current TetheringCoverageTests, and
FrameworksNetTests.

Adding min_sdk_version to the test prevents it from using deprecated
IoUtils utilities. Replace it with the non-deprecated alternative.

Bug: 187935317
Test: atest ConnectivityCoverageTests
Original-Change: https://android-review.googlesource.com/1731232
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383

Remi NGUYEN VAN   commited 2021-07-05 05:00:36 +00:00
168b3d19f1
Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev
Victor Chang   authored and   Android (Google) Code Review   commited 2021-06-29 08:12:04 +00:00
e4132c8ca0
Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests
It's a partial cherry-pick of https://r.android.com/1731232

Bug: 154796679
eest: atest ConnectivityCoverageTests
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I23565c4144e665130585a86ce66cee6c2da07b60

Remi NGUYEN VAN   authored and   Victor Chang   commited 2021-06-28 16:53:15 +01:00
819045fc60
Remove ConnectivityServiceTest signature perms use
To allow unit tests to run without platform certificates, remove
signature permission usage in ConnectivityServiceTest.

This mocks permission checks done in ConnectivityService for which the
test assumed that the permission was held, and mocks calls to
BatteryStatsManager. Calls to ActivityManagerService (through
PendingIntent) are done with shell permissions as the test uses real
PendingIntent mechanics.

Bug: 187935317
Test: atest FrameworksNetTests
Merged-In: If309d653ac2e9bbcf1b94bcee6336367289df359
Change-Id: If309d653ac2e9bbcf1b94bcee6336367289df359

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

(cherry picked from commit 595dda3604)

Change-Id: Idb19b0f7cb87bb4d9de7a0b1a0e4128c2d6b9c6d

Remi NGUYEN VAN   authored and   Chiachang Wang   commited 2021-06-23 08:39:38 +00:00
ff55aeb916
Merge "Add connectivity coverage tests" am: cc79d7c0f8 am: 68114fe408 am: 3d25f6e8a7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1731232

Change-Id: Ie9549d26fc4f1246e8959e326d2bd6f834bf222c

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-21 16:23:57 +00:00
b6bf25b91a
Merge "Add connectivity coverage tests" am: cc79d7c0f8 am: 68114fe408
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1731232

Change-Id: I6cc7f3a3abe97fccc59e14e77e99a0843f3363bb

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-21 13:56:37 +00:00
3d25f6e8a7
Merge "Remove ConnectivityServiceTest signature perms use" am: 54c7434f0d am: 96ad425c5e am: 595dda3604
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

Change-Id: I7dd3c5e7da9097ebedd7f4a836d4e78ef9bf08e5

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-16 11:49:54 +00:00
4ca7a11543
Merge "Remove ConnectivityServiceTest signature perms use" am: 54c7434f0d am: 96ad425c5e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

Change-Id: Ifd8c397644f5fc680b34905882ec287bb43c1e1b

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-16 11:37:53 +00:00
595dda3604
Add connectivity coverage tests
The coverage tests will allow measuring code coverage for all
Connectivity+Tethering code.

This is a combination of the current TetheringCoverageTests, and
FrameworksNetTests.

Adding min_sdk_version to the test prevents it from using deprecated
IoUtils utilities. Replace it with the non-deprecated alternative.

Test: atest ConnectivityCoverageTests
Change-Id: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383

Remi NGUYEN VAN   commited 2021-06-16 19:45:20 +09:00
fe20e1317d
Remove ConnectivityServiceTest signature perms use
To allow unit tests to run without platform certificates, remove
signature permission usage in ConnectivityServiceTest.

This mocks permission checks done in ConnectivityService for which the
test assumed that the permission was held, and mocks calls to
BatteryStatsManager. Calls to ActivityManagerService (through
PendingIntent) are done with shell permissions as the test uses real
PendingIntent mechanics.

Bug: 187935317
Test: atest FrameworksNetTests
Change-Id: If309d653ac2e9bbcf1b94bcee6336367289df359

Remi NGUYEN VAN   commited 2021-06-16 16:32:03 +09:00
18a979fa41
Merge "Revert "Use mockito-extended in FrameworksNetTests"" am: a6c06af0fa am: 6f6035a29e am: 9134dac0b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1734372

Change-Id: Ie28db4a25144eb558bb3c7c72e24c66a38091e2c

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-11 02:12:04 +00:00
4bb45d88ea
Merge "Revert "Use mockito-extended in FrameworksNetTests"" am: a6c06af0fa am: 6f6035a29e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1734372

Change-Id: I8c8a2f734c433c0cf6fe158fcbf26a75a82d0d0a

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-11 01:56:43 +00:00
9134dac0b1
Merge "Revert "Use mockito-extended in FrameworksNetTests""
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-06-11 01:26:44 +00:00
a6c06af0fa
Revert "Use mockito-extended in FrameworksNetTests"
This reverts commit 98b76cc2ec.

Reason for revert: <INSERT REASONING HERE>

b/190622577

Change-Id: Ief39f82875e6fa885829aea62eed00f2f2e6774e

xingdai   commited 2021-06-10 21:41:54 +00:00
892a0ef152