Commit graph android_packages_modules_Co.../tests/cts/hostside/Android.bp
Message SHA1
Remove dependencies on the 1-variant fallback
When adding a dependencies, if the variants don't match, but the
dependency only has 1 variant anyways, soong will always use that
variant. This makes it hard to add new variants to soong, because the
1-variant fallback stops being used and you start getting missing
variant errors. Make changes to bp files such that all dependencies
correctly specify the variant to use.

Bug: 372091092
Flag: EXEMPT refactor
Test: m nothing
Change-Id: I8d4f59044f268088b44357d27322abbdcdc3001c

Cole Faust   commited 2024-10-22 16:31:00 -07:00
9ff8f4c81b
Remove CtsHostsideNetworkTestAppNext.
This is now identical to CtsHostsideNetworkTestsApp, and we're
getting rid of -Next targets anyway, so there's no point in
keeping it.

Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: I57eb7c6d9bc37d222a9449bbc85265e7c6ec9ffc

Lorenzo Colitti   commited 2024-09-20 14:48:51 +09:00
0820ccb033
Set all hostside network tests apps' target SDK to 10000.
This ensures they are subject to the most restrictive target SDK
restrictions and that we never have to manually increment their
target SDK version.

Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: I66e4e53720b2860094b7a4d3194a81a063b116da

Lorenzo Colitti   commited 2024-09-20 14:48:19 +09:00
6a655a02d1
Consolidate defaults for hostside network tests apps.
For now, only share a couple of statements (min_sdk_version and
platform_apis). More will be added later.

Also, remove the test_suites stanzas everywhere. These are not
relevant for test apps because the APKs will be pulled in by
the data: stanzas anyway.

Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: If510519b3bdd6ab27c1923bae523cddb694e0ecc

Lorenzo Colitti   commited 2024-09-20 14:48:12 +09:00
64cd28ddd7
Breaking up hostside network tests module
Tests for the connectivity module and network policy are both currently
residing in the same cts module leading to significant problems while
maintaining the tests. Breaking them up into two separate modules so
making changes and maintaining error free tests is easier.

Development of network policy changes occurs in non-updatable system
code so relevant tests should be moved outside of the apex module
respository. This will be possible after this change.

Network policy related tests are moved to the new module
CtsHostsideNetworkPolicyTests, with classes renamed accordingly.

Since some code was shared between tests, that code is now duplicated in
the new module.

No functional change to tests is intended. Further refactorings to
better suit the new structure should be pursued independently via
follow-up changes in respective modules from now on.

Test: atest CtsHostsideNetworkTests
Test: atest CtsHostsideNetworkPolicyTests

Bug: 322115994
Change-Id: I2c6ad2281ede6bad099c971b1f212244881a262d

Suprabh Shukla   commited 2024-04-26 12:11:13 -07:00
0001cfd931
CTS for default background network restrictions
Apps will now lose network access once they are in top-sleeping or
higher process state. Adding some cts tests to ensure correct behavior.

The tests are using temporarily using junit Assume to skip if the
feature flag is enabled to enable a following code migration.

Test: atest CtsHostsideNetworkTests

BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing method

Bug: 304347838
Change-Id: Iba7c7bd01309fa7a301fdc1524033f0fad5ae512

Suprabh Shukla   commited 2024-02-13 17:08:10 -08:00
b2e574d4b8
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
[Test] Add mtcs tag to CtsHostsideNetworkTests
The test relies on the tethering module code. Test is supposed to run on the matching version of module prebuilt. Add mtcs tag to ensure this.

Bug: 316939964
Change-Id: I2b4d212a7dadf11e847abc5b6855442fdcc87a7c

Ken Chen   commited 2023-12-25 05:09:50 +00:00
c2cbf84a8a
Skip presubmit for flaky tests in HostsideVpnTests due to Out of SLO
Test: TH
Bug: 291701394
Change-Id: Iea67a9402f2712746c8e7424aacf66f82099700c

Junyu Lai   commited 2023-07-26 16:20:09 +08:00
7eb00f79c3
Check network slicing declaration for network request
When the application wants to request network with
NET_CAPABILITY_PRIORITIZE_BANDWIDTH or
NET_CAPABILITY_PRIORITIZE_LATENCY, it has to declare
PackageManager.PROPERTY_NETWORK_SLICE_DECLARATIONS property and also
adds the declaration in a separate XML files. Otherwise, the request
will fail with a SecurityException being thrown.

Test: atest FrameworksNetTests CtsNetTestCases
Bug: 266524688
Change-Id: I6affc857b803211517368da288e1b2fdc06a955b

Yuyang Huang   commited 2023-02-28 17:38:30 +09:00
96e8bfee5f
Move the CtsHostsideNetworkTestsAppNext to avoid automerger conflict
Move the CtsHostsideNetworkTestsAppNext to the top of file to to prevent
any future automerger merge conflict between aosp and downstream
branches. The CtsHostsideNetworkTestsAppNext target will not exist in
some downstream branches, but it should exist in aosp and some
downstream branches.

Test: atest -c CtsHostsideNetworkTests
Bug: 270006466
Merged-In: I8cb64d8bb86b781cd57d1a1a466c56185573fcc2
Change-Id: Icc475586d6f26d913b328647b94af1b53a3bb32d

Yuyang Huang   commited 2023-02-20 19:14:45 +09:00
626b3509e9
Simplify per-target-SDK LinkProperties tests.
Currently these tests run as hostside tests and require a lot of
boilerplate, including their own CtsHostsideNetworkTestsApp3
build target.

Move the coverage to LinkPropertiesTest using the new-ish
@CtsNetTestCasesMaxTargetSdk31 annotation, and remove the
hostside tests.

The only test that is not being moved is one that checks the
behaviour of disabling the compat change on T. This test is not
very useful because it can only run on userdebug builds and not
on production builds, because CtsHostsideNetworkTestsApp3 targets
SDK 33. We do have test coverage for disabling the compat change
on an app targeting SDK 31, where it is allowed.

Fix: 236087258
Test: atest CtsNetTestCasesMaxTargetSdk31
Test: atest CtsNetTestCasesLatestSdk:android.net.LinkPropertiesTest
Change-Id: I6d4b1ba40f6cb63b30a600c227e9628858c03d73

Lorenzo Colitti   commited 2022-07-22 17:53:55 +09:00
ccd3020a91
Add tests for LinkProperties#EXCLUDED_ROUTES
Add CTS tests for LinkProperties#EXCLUDED_ROUTES gated change.
These tests check LinkProperties#getRoutes and
LinkProperties#getAllRoutes behavior depending on whether the gated
change is enabled.

Bug: 186082280
Test: atest HostsideLinkPropertiesGatingTests
Change-Id: Id353714331a19d09022d20f186c8f71343686da7

Taras Antoshchuk   commited 2022-05-03 23:45:33 +02:00
f0c8daa0eb
Add test dependencies for CtsHostsideNetworkTests
This test need other apks for running the test, but those dependencies
actually defined in suite level of cts but never defined in module level
actually which may lead to test failure due to lack of apks. This CL use
target_required attribute to define the missing test dependencies.

Bug: 227777774
Test: m clean ; atest -c HostsideRestrictBackgroundNetworkTests
Change-Id: I34476d3e261c1d2392405ceeb1459d2f135bbcaf

yangbill   commited 2022-04-13 10:29:46 +08:00
c1b8af215a
Revert "Revert^2 "Revert "Add CTS tests for exclude VPN routes A..."
Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."

Revert "Revert "Revert "Revert "Add VpnServiceBuilderShim for Vp..."

Revert submission 1941195-revert-1931760-reland-vpn-impl-part-2-WGARECSJEM

Reason for revert: fixed merge conflict with aosp/1938197
Reverted Changes:
Ic25e5e4ea:Revert^2 "Revert "Add CTS tests for exclude VPN ro...
Ic72cafcf5:Revert "Revert "Revert "Add APIs that allow to exc...
I53802190a:Revert "Revert "Revert "Add VpnServiceBuilderShim ...

Change-Id: I5a6ceaae21c563de8bb71338c29973f58178b456

Taras Antoshchuk   commited 2022-01-10 10:20:46 +00:00
d9ba74953b
Revert^2 "Revert "Add CTS tests for exclude VPN routes APIs""
1a6d19e4b8

Change-Id: Ic25e5e4eaf57e033a9304244387e6fba15213d2b

Matt Buckley   commited 2022-01-07 17:44:52 +00:00
01d9abecef
Revert "Revert "Add CTS tests for exclude VPN routes APIs""
This reverts commit f4882153ed.

Reason for revert: failing build target configuration is fixed

Change-Id: Ic8ed8fce72a1c816ee6766f296efaddeafcd2f70

Taras Antoshchuk   commited 2022-01-05 14:00:25 +01:00
1a6d19e4b8
Revert "Add CTS tests for exclude VPN routes APIs"
Revert "Add APIs that allow to exclude routes from VPN"

Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: Ic4f86f405c395f1356de1a6f8cf9e92692d953ce
BUG: 210979001

Ayush Sharma   commited 2021-12-16 14:40:13 +00:00
f4882153ed
Add CTS tests for exclude VPN routes APIs
Add HostsideVpnTests test cases for different combinations of
included/excluded routes in VPN configuration.

Bug: 186082280
Test: atest HostsideVpnTests
Change-Id: I993a32d4066a851eb0c455aff2f599569e958ba7

Taras Antoshchuk   commited 2021-12-13 18:47:58 +01:00
673eb6ecd2
Verify apps cannot receive ACTION_SNOOZE_WARNING broadcast.
Bug: 177931370
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Platform changes related to this are not in AOSP yet.
Change-Id: I6d525c4d88ba01838d51a873251593281b628898

Sudheer Shanka   commited 2021-07-26 15:51:09 +00:00
7bbbdbd4f9
[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity
Added SPDX-license-identifier-Apache-2.0 to:
  Tethering/Android.bp
  Tethering/apex/Android.bp
  Tethering/bpf_progs/Android.bp
  Tethering/common/TetheringLib/Android.bp
  Tethering/tests/Android.bp
  Tethering/tests/integration/Android.bp
  Tethering/tests/mts/Android.bp
  Tethering/tests/privileged/Android.bp
  Tethering/tests/unit/Android.bp
  tests/cts/hostside/Android.bp
  tests/cts/hostside/aidl/Android.bp
  tests/cts/hostside/app/Android.bp
  tests/cts/hostside/app2/Android.bp
  tests/cts/hostside/certs/Android.bp
  tests/cts/net/Android.bp
  tests/cts/net/api23Test/Android.bp
  tests/cts/net/appForApi23/Android.bp
  tests/cts/net/jni/Android.bp
  tests/cts/net/native/dns/Android.bp
  tests/cts/net/native/qtaguid/Android.bp
  tests/cts/net/util/Android.bp
  tests/cts/tethering/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I8534c580f0e2a17be146300b67b3604817b64507

Bob Badour   commited 2021-02-16 04:09:58 -08:00
97e6be27f6
Merge history of CTS
BUG: 167962976
Test: TH
Merged-In: I30d52c4df571c894b7797300e8f56ddd4b2cc2dd
Change-Id: Id343f5a31604abfe70140343bffab20503cd2705

Baligh Uddin   commited 2020-11-09 02:17:15 +00:00
6a41dd4d8e