Commit Graph

14 Commits

Author SHA1 Message Date
Sudheer Shanka
4a96c79495 Update CtsHostsideNetworkTests to take network capability into account.
Bug: 177641226
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Expedited jobs are not available in AOSP
Change-Id: Ic75ebdc184764b7e7ac02d3e2ca18cbba1c55ee5
2021-02-24 08:00:12 -08:00
Sudheer Shanka
643abc73d9 Ensure location is enabled before getting SSID.
When location is disabled, Wi-Fi scan results and SSID are not available
to apps.

Fixes: 153850762
Fixes: 153396893
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I05285811d7131e116d5e1d072137ed2cf9576d05
2020-04-14 21:31:40 +00:00
Sudheer Shanka
bae482a772 Enable verbose logging for the test app.
Bug: 145420790
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I8ba31a365e66bd199f19de1ff77cdf01df89602b
2020-02-17 13:34:09 -08:00
Sudheer Shanka
9a1e3be614 Fix a regression in how required properties are collected.
+ Enable app standby mode before running the tests.

Fixes: 147459100
Fixes: 117169751
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: cts-tradefed run singleCommand cts-on-gsi --skip-device-info \
      --skip-preconditions -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I782f8a06922622d28f9a9d5c9f2afa2b12f8aa80
2020-02-05 18:09:08 -08:00
Kweku Adams
1881bc644f Change network parole while charging tests.
The periodic parole window is the 10 minute window that occurs every
24 hours to let RARE apps run. Now that we have the quota system in
place, there's no need to have the periodic parole window. Alarms and
jobs will still be allowed to run when charging. Network will continue
to be restricted for RARE apps even when charging. JobScheduler requests
an exception for RARE jobs in quota, so they will still be able to run.
With this change, idle apps should still not get network when charging
unless JobScheduler requests it, so we have to update the tests.

Bug: 136184981
Test: atest AppStandbyControllerTests
Test: atest CtsAlarmManagerTestCases
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Test: atest com.android.server.AlarmManagerServiceTest
Test: atest com.android.server.AppStateTrackerTest
Test: atest com.android.server.job.controllers.QuotaControllerTest
Change-Id: Icd7b6eff8777f9b53a10eca521b73988f58f2d84
2019-10-14 11:37:43 -07:00
Sudheer Shanka
09ae6d2645 Pull service dumps to help debug test failures.
+ Convert tests to use Junit4
+ Add annotations to specify required conditions for the test to run.

Bug: 137859686
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideNetworkCallbackTests.java
Change-Id: I93317c201a0ea06732e29154ab7e140735381f59
2019-08-20 10:19:32 -07:00
Julien Desprez
bd43e6d4fb Mark module as "secondary_user" since it uncovered bug before
This will allow running this module against a secondary
user in continuous infra to uncover bugs.

Test: run cts-unit-tests
Bug: 130892086
Change-Id: Ic8af2e3e77e24db340b2894c2d36e3501962952c
2019-06-19 15:25:08 -07:00
Lorenzo Colitti
ad17ee9e92 Add instant and ABI XML tags for hostside networking tests.
These are not multi-ABI because the behaviour does not depend on
the ABI of the app. Some of the APIs are ultimately backed by JNI
code in the system server, but that only depends on the system
server's ABI, not the app's.

Enable instant mode because these applications are subject to the
same network restrictions as other apps.

Fix: 123364589
Test: atest CtsHostsideNetworkTests
Test: cts-tradefed run commandAndExit cts --enable-parameterized-modules --module-parameter instant_app -m CtsHostsideNetworkTests
Change-Id: Ib3c4cd365ffe95889d51a236f035ea84516f0abd
2019-04-11 20:43:59 +09:00
Sudheer Shanka
6d389c2bfc Don't reset battery status before disabling battery saver mode.
Resetting battery status makes the "disabling battery saver mode"
operation that follows it a no-op if the device is plugged-in to power.
In this case, sticky battery saver status won't get reset and might
affect the tests following it.

Also, change back turnBatteryOff -> "cmd battery reset" since issue "72502904"
is fixed now.

Fixes: 77236363
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I93e11c714200e8de6864a3bd7627eb66842a39d1
2018-03-29 10:29:16 -07:00
jdesprez
607948bfb0 Add cts suite tag to all CTS modules
Test: build
Bug: 65303193
Change-Id: I064459de5d4f8e958f41ac238cad35e5f7e99d3a
2017-12-16 04:19:31 -08:00
Sudheer Shanka
1f672e83a0 Set parole_duration=0 for CtsHostsideNetworkTests.
Some of the tests in CtsHostsideNetworkTests module will put the
test app in App standby mode and check the network availability.
If the device enters into parole state during the test, then the test
fails. Set the parole_duration to 0 so that it won't parole state
won't affect these tests.

Bug: 63140218
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I8158eba74f03e82566de1de9f94b981b17175df5
2017-07-01 00:42:43 -07:00
Guang Zhu
dd8918c80b add component metadata to all CTS module configs
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: Id856f93c0d2a018be65bff33459b4b703d23257d
2017-06-05 16:15:37 -07:00
Nicholas Sauer
a552317982 [CTS] - Set test runtimes
bug: 27747405
Change-Id: If08ec156678d5435c88d9f179d3bacd064493aff
2016-03-19 00:10:02 +00:00
Nash Lincoln
0784f04f1b migrate net host tests to cts_v2
Change-Id: Ida3141522a536a2d33bb366fdb6b00ced907c3a4
2015-11-06 17:05:17 -08:00