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
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 Colitticommited 2024-09-20 14:48:51 +09:00
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 Colitticommited 2024-09-20 14:48:19 +09:00
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 Colitticommited 2024-09-20 14:48:12 +09:00
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
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
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
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
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
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
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 Colitticommited 2022-07-22 17:53:55 +09:00
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
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
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
Add HostsideVpnTests test cases for different combinations of
included/excluded routes in VPN configuration.
Bug: 186082280
Test: atest HostsideVpnTests
Change-Id: I993a32d4066a851eb0c455aff2f599569e958ba7
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