Commit Graph

9 Commits

Author SHA1 Message Date
Maciej Żenczykowski
127a1441c3 bump min_sdk_version from 29 (Q) to 30 (R)
Mainline no longer supports Q.
These files were recently moved into p/m/C as part of a refactor.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f06ace921db6c79d63c0048bdb73d167ff606cf
2023-09-19 23:22:58 +00:00
Remi NGUYEN VAN
f1846ac13b Check that wifi, cell validates before tests
Tests are sometimes run on hardware devices with wrongly configured wifi
or cell data. Ensure that this is reported as an infra error, and not a
test error, so the root cause is easier to identify.

Bug: 264170054
Test: atest
Change-Id: I4f964fbd4ee497e8ac92f7729375b75b6c4594a3
2023-09-19 17:26:20 +09:00
Remi NGUYEN VAN
837837e0fe Use requestNetwork for mobile data, not a callback
On devices that do not have always active mobile data, it needs
to be requested for onAvailable to be called.

Change-Id: Ic814684bcd06389c013a6e6636487d9b47627901
Test: TH
2023-08-01 08:48:32 +00:00
Remi NGUYEN VAN
e2b5213774 Make ConnectivityCheckTargetPreparer more generic
Rename ConnectivityCheckTargetPreparer to
ConnectivityTestTargetPreparer, and the ConnectivityChecker app to
ConnectivityTestPreparer, and remove the assumption that the app only
does connectivity checks.

This will allow overriding the app with versions that have more specific
setup steps in downstream branches.

Bug: 263665773
Bug: 267413275
Test: tests using this preparer
Merged-In: Icb9b1eb8eb1c75f89cb751e0ca696ea96359e6d0
Change-Id: Icb9b1eb8eb1c75f89cb751e0ca696ea96359e6d0
2023-05-16 15:14:30 +09:00
Chalard Jean
febf4ab6fb Remove eventuallyExpectOrNull usages from AOSP
This is not useful because it has the exact same semantics
as poll() : it returns the first event that matches the
predicate within the timeout, or null if none.

Unfortunately the method can't be removed until all
uses in internal master are removed, so the actual
removal will have to wait for the next patch.

Test: TH
Bug: 157405399
Change-Id: I471c44568e359f8686dcb21ae04c76ca8095f02f
2023-03-07 21:47:11 +09:00
Remi NGUYEN VAN
da0e172551 Check that cell network is available before tests
Instead of only checking that a sim card that supports data connectivity
is inserted, also check that there is an available cellular network.
This helps ensure that the device is setup with a working data plan and
APN configuration.

Bug: 242628522
Test: atest CtsNetTestCases
Change-Id: Id47d49de77da5d9f7a87ff34b954c61662965c9e
2022-08-22 11:15:49 +09:00
Chiachang Wang
7068c88921 Enable strict_updatability_linting in frameworks/libs/net
Enable the strict_updatability_linting here first as a prior
commit to enable strict_updatability_linting in connectivity
modules.

Bug: 188851968
Test: m lint-check ; atest NetworkStaticLibTests
Change-Id: Idac98a1c85bf5bb86269b1daad2b444cfb58db8a
2021-11-19 15:41:27 +08:00
Bob Badour
891a3b9fb7 [LSC] Add LOCAL_LICENSE_KINDS to frameworks/libs/net
Added SPDX-license-identifier-Apache-2.0 to:
  common/testutils/app/connectivitychecker/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I9e25f435ce9835f12a167e6c57e33f6d87c159de
2021-11-11 10:10:56 -08:00
Remi NGUYEN VAN
c02dcd721a Add ConnectivityCheckTargetPreparer
ConnectivityCheckTargetPreparer is a tradefed target preparer that uses
the connectivitychecker app to verify device configuration, before
running any test.

The connectivitychecker app verifies that the device has a
pre-configured wifi configuration and can connect to it (except for
virtual devices where it may create the configuration itself), and
verifies that the device has a data-enabled SIM card inserted.

Checks are skipped if the device is not wifi- or mobile data-capable,
and can be skipped for local testing by running with:

  atest X -- --test-arg \
    com.android.testutils.ConnectivityCheckTargetPreparer:disable:true

Test: atest CtsNetTestCasesLatestSdk
Change-Id: I5b6d34a6c393863af23af57ff026b15973e9e784
2021-11-04 19:57:21 +09:00