Commit Graph

4 Commits

Author SHA1 Message Date
Paul Hu
7615075d12 Add sim card requirement for net permission tests
The network permission tests perform a connectivity check before
running, which means that a SIM card is required to check for
mobile data. However, there is no SIM card token sharding defined
in the AndroidTest.xml to make sure that the SIM card is
available for testing. Therefore, add the definition to the
AndroidTest.xml file.

Bug: 295708437
Bug: 295611982
Test: m
Change-Id: I20201ea8c7272771fdc59752aa2aae22b14d1e34
2023-08-15 09:40:58 +00:00
Paul Hu
b907d74932 Add connectivity pre-check for net permission cts tests
The net permission cts tests require an available network to run.
Therefore, a connectivity pre-check should be added to ensure
that there is an active network before running the tests.

Test: atest CtsNetTestCasesUpdateStatsPermission \
      CtsNetTestCasesInternetPermission
Change-Id: I1c7fb43bb009eb0fd2570bc40a14e55f5ebd2d8b
2023-06-13 17:39:19 +08:00
Frank Feng
9a5c232ccc Update tests/cts/netpermission/internetpermission/AndroidManifest.xml
Remove:
<meta-data android:name="listener" android:value="com.android.cts.runner.CtsTestRunListener" />

Bug: 267766325
Test: TH
Change-Id: I3a38fa78faff38a67d628597ecd72ebc3f90bd9f
2023-02-24 07:52:08 -08:00
paulhu
fd4deb3e9e Move network permission cts tests to module
CtsNetTestCasesUpdateStatsPermission and
CtsNetTestCasesInternetPermission are used to verify
PermissionMonitor relevant permissions.

CtsNetTestCasesInternetPermission: One app does not have INTERNET
permission so it should not be able to create network socket.

CtsNetTestCasesUpdateStatsPermission: The other one specify the
UPDATE_DEVICE_STATS in the AndroidManifest file but it is not a
privileged app so it should not have UPDATE_DEVICE_STATS
permission granted.

Bug: 228253498
Test: atest CtsNetTestCasesUpdateStatsPermission \
      CtsNetTestCasesInternetPermission
Original-Change: https://android-review.googlesource.com/926255
Merged-In: I380307fe0a5bc6aac6d9f836f03f0d043b99ccf5
Change-Id: I380307fe0a5bc6aac6d9f836f03f0d043b99ccf5
2022-04-08 10:45:50 +08:00