Commit Graph

964 Commits

Author SHA1 Message Date
Sudheer Shanka
2bf68eba3a Update the battery charging status when turning battery on/off.
Bug: 72656089
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ida6d3ff4a78c91e656b49a26006603973753c808
2018-02-13 15:59:28 -08:00
Sudheer Shanka
dc134af7aa Update netpolicy tests to not assume DUT will be plugged-in.
Bug: 73037837
Bug: 72656089
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I79aaaf083255626896901fcfdade70b4705cfc06
2018-02-10 15:43:59 -08:00
jdesprez
48f31fac64 Replace TestIdentifier by TestDescription
Large scale update of our test interface.

Test: build all targets
Bug: 70543295
Change-Id: I1600b8b950fe34bf4656e7769b8f7d3f365e3c0b
2018-02-07 16:37:13 -08:00
Adam Vartanian
57e1941be9 Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev am: fb27c032ff am: 3c22d6bea8 am: bbc39aba5b
am: df4e5f9902

Change-Id: I1f9a8d36b810c58a435d88f1acc19e61ed9bdd56
2018-02-03 23:42:59 +00:00
Adam Vartanian
df4e5f9902 Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev am: fb27c032ff am: 3c22d6bea8
am: bbc39aba5b

Change-Id: Ic129a3fdff54705ba345cd032a0b17ce502ac5c9
2018-02-02 03:58:55 +00:00
Adam Vartanian
bbc39aba5b Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev am: fb27c032ff
am: 3c22d6bea8

Change-Id: I2fe9d75f0bf5b94f2fa0b2d0a819f2b8281ccf7b
2018-02-02 03:32:08 +00:00
Adam Vartanian
3c22d6bea8 Merge changes from topic "am-325cd506-a538-4cb7-a65c-bc30576c59e9" into oc-dev
am: fb27c032ff

Change-Id: I459897b291fff063091f4d5e64330df4ade47c0c
2018-02-01 23:31:51 +00:00
Etan Cohen
4fa2e9968e Merge "[AWARE] Remove "Respond to ANY" API - dummy tests deprecated" 2018-01-31 16:05:05 +00:00
Ricky Wai
12a04fc52d Merge "Add CTS for verifying ConnectivityManager.getNetworkWatchlistConfigHash()" 2018-01-31 15:54:48 +00:00
Android Build Merger (Role)
ea75ff0609 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f am: 3bc75c3136 am: 1e65404eb8 am: 330b09b8a8 am: 119bbb1cdb
Change-Id: Ib52e5a020d679328e9d91534e636f6f89abb8781
2018-01-31 11:17:54 +00:00
Android Build Merger (Role)
1e65404eb8 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f am: 3bc75c3136
Change-Id: I3e58d87b69ba1f32474550364e04324e6fc8fd88
2018-01-31 11:17:39 +00:00
Android Build Merger (Role)
3bc75c3136 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c am: 2f52ceef6f
Change-Id: I164c155385cef9ca2ed8bb810d1c1e7be65e4458
2018-01-31 11:17:34 +00:00
Android Build Merger (Role)
2f52ceef6f [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a am: 67ae9d3245 am: ad9fa4877c
Change-Id: Ie5d7744787cd7b700b42dc22ddc921f5b1965a01
2018-01-31 11:17:29 +00:00
Android Build Merger (Role)
67ae9d3245 [automerger] Add CTS test for URI fix. am: 85156429a2 am: 27914625b1 am: 662ce9724a
Change-Id: I29da2e67aa8c3ec9bde0d72c91ada85f160e39d9
2018-01-31 11:17:19 +00:00
Android Build Merger (Role)
27914625b1 [automerger] Add CTS test for URI fix. am: 85156429a2
Change-Id: Iedd07e900b8512737df2d0d6ca33920ef9bfd30b
2018-01-31 11:17:09 +00:00
Adam Vartanian
85156429a2 Add CTS test for URI fix.
Bug: 71360761
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: I09a156040d4970b7b2f973e9bffcfc97a8ff2274
2018-01-31 10:47:13 +00:00
Hugo Benichi
746b3cee6f Merge "Add CTS coverage for MacAddress" am: e264485c55 am: 5e62adab76
am: 4750a2a9f8

Change-Id: I0a5ee9b767dbee5e8d5b2880454f6d3019892f7b
2018-01-30 23:44:08 +00:00
Hugo Benichi
83e4cf5085 Add CTS coverage for MacAddress
Bug: 71866627
Test: cts-tradefed run cts-dev --module CtsNetTestCases -t android.net.cts.MacAddressTest
Change-Id: I2d8702b154a485f89911e1affb7cee79692f3ac7
2018-01-30 14:40:51 +09:00
Ricky Wai
01be94c60f Add CTS for verifying ConnectivityManager.getNetworkWatchlistConfigHash()
Bug: 63908748
Test: cts-tradefed run cts -m CtsNetTestCases -t android.net.cts.NetworkWatchlistTest
Change-Id: I9c7c9349287a0a856aec128b3fa5560359921155
2018-01-29 14:11:14 +00:00
Etan Cohen
9a37de577c [AWARE] Remove "Respond to ANY" API - dummy tests deprecated
Aware API which permitted a Responder (Publisher) to accept data
path requests from ANY peer (as opposed to a specific peer with a
Peer ID or MAC address) is deprecated in the API update.

The CTS tests in any case cannot test the full exchange (which
requires 2 devices and is tested using CtsVerifier). They tested
the creation of a valid Network Specifier and a network request
which then times-out. However, the network request did not specify
a peer - a now deprecated API.

Update the tests:
- For OOB data-path specify a dummy MAC address
- Remove the in-band data-path tests since there is no public API
  to create a dummy PeerHandle.

Bug: 72175022
Test: CTS passes
Change-Id: I97b74d80d0f9dfdc43c4c743a18c960c05ab6a53
2018-01-24 17:00:44 -08:00
Dianne Hackborn
c565ba340d Merge "Fix issue #72116995: Add permission guarding Service#startForeground" 2018-01-24 17:58:49 +00:00
Jiyong Park
e2fea86b44 Use stubs libs for android.test.base/runner/mock
android.test.base/runner/mock libraries are shared libraries that are
built without SDK, but with framework interanl libraries (framework.jar,
etc). Apps or libs that are built with SDK (LOCAL_SDK_VERSION is set)
shouldn't use them, but instead the stubs version of the test framework
libraries, which are built using SDK.

This is because, the build system does not allow a module built with SDK
to depend on another module built without SDK. This has been
exceptionally allowed with warnings, but will soon be errors.

In order to prevent the expected build breakage, direct reference to the
shared libraries are all changed to the stubs libraries.

Note: no one has been using these shared libs statically. So, it is
guaranteed that they won't encounter a problem due to missing
<uses-library name="android.test.runner"/> even after this change.

Bug: 69899800
Test: m -j checkbuild
Change-Id: I278fcf0b7f4972c473462eb88c46a111b0ce7d89
2018-01-24 17:15:49 +09:00
Sudheer Shanka
bc642d878e Fix netpolicy cts failures due to missing FLAG_ACTIVITY_NEW_TASK.
Bug: 72219677
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I076e10b09f7d8a65120e62ed50afb2d326b62267
2018-01-22 19:28:21 -08:00
Dianne Hackborn
568c73dec2 Fix issue #72116995: Add permission guarding Service#startForeground
Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: Idd6dc142fe327c2471455a29473d4b9048bd1f08
2018-01-21 19:57:12 -08:00
jdesprez
83fa03fb3f Use TestRuNResult and testResult from Tf not ddmlib
Test: build cts, cts unit tests
Bug: 70543295
Change-Id: I0a23e3cd8466623a32b01ba6b56d35478679645c
2018-01-20 06:41:02 -08:00
nharold
f4e0b5bb52 Merge "IpSec - API Tweak for removeTransportModeTransforms" am: 1ca0e05919 am: c1f0cbb244
am: dc42b714fb

Change-Id: I30c1aec77926a8c6f5867a3364dc0b3b0ec38d49
2018-01-17 20:45:59 +00:00
nharold
1ca0e05919 Merge "IpSec - API Tweak for removeTransportModeTransforms" 2018-01-17 19:07:10 +00:00
nharold
fb34735033 Merge "Update testCreateTransform() for one-way transforms" am: 44eef0ee8d am: 9715ccb8b1
am: 1d9eb58067

Change-Id: If2acd0fb9ff565eecf33544309e7b465f662bd62
2018-01-17 10:16:39 +00:00
nharold
ebbeaa53f1 Merge "Update IpSecManagerTest for API changes to Transforms" am: 5810dda443 am: ed61c2a2a2
am: 4267616561

Change-Id: Ie4b65d1ba4578209776a8f9270e17ffba323d4a4
2018-01-17 10:00:06 +00:00
Nathan Harold
9c590594b6 IpSec - API Tweak for removeTransportModeTransforms
Update IpSec tests to remove the transform parameter from
calls to removeTransportModeTransform(). It is infeasible
and thus removed.

Bug: 72079356
Test: cts - IpSecManagerTest
Change-Id: Iaa0b35b24bf044503da9af9966508ac5e88846e1
2018-01-17 01:07:52 -08:00
nharold
44eef0ee8d Merge "Update testCreateTransform() for one-way transforms" 2018-01-17 08:45:29 +00:00
nharold
5810dda443 Merge "Update IpSecManagerTest for API changes to Transforms" 2018-01-17 08:40:37 +00:00
Nathan Harold
f91b5a214b Update testCreateTransform() for one-way transforms
This patch augments testCreateTransform() to
selectively apply the ipSecTransform in one/both
directions and then verifies that the link succeeds or
fails correctly. In addition, this converts the test
to use the Java sockets API for DatagramSocket instead
of using the FD-based API. One of the combos does not
fail as expected, so b/72048263 is tracking further
work needed.

Bug: 72047396
Bug: 71717213
Test: cts - IpSecManagerTest

Change-Id: Ied961f442b29f1e66ded37c7ffe7afdd4a5c49da
2018-01-16 21:12:43 -08:00
Nathan Harold
19adaa182d Update IpSecManagerTest for API changes to Transforms
API changes in IpSecManager and IpSecTransform are
reflected in these test updates: no functional change
to the test; just style updates along with improvement
in the clarity of using a single transform for both
directions.

Bug: 71717213
Test: CTS - IpSecManagerTest
Change-Id: Ia6933d010620516672687080898f8c4fd83223bc
2018-01-16 11:15:13 -08:00
Android Build Merger (Role)
f64429d19b Merge "Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071 am: 5a35f88cbb am: 8324e947c3 am: cf9ee25695" into oc-mr1-dev-plus-aosp
am: 2dbf42fa50

Change-Id: I60651eb0c610362ad48a02c93db2e07b01908ecd
2018-01-12 00:51:30 +00:00
Alex Vakulenko
532d9e9f29 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071 am: 5a35f88cbb am: 8324e947c3
am: cf9ee25695

Change-Id: I471d0a7d7c616fdfe792d05ad63762da941dbb36
2018-01-12 00:28:38 +00:00
Alex Vakulenko
cf9ee25695 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071 am: 5a35f88cbb
am: 8324e947c3

Change-Id: Ie74187a985dcfa543e1ccd489cf5019d1a46db9e
2018-01-12 00:23:34 +00:00
TreeHugger Robot
41bdd1d7b5 Merge "Update PROCESS_STATE_FOREGROUND_SERVICE constant value." 2018-01-12 00:20:12 +00:00
Alex Vakulenko
8324e947c3 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071
am: 5a35f88cbb

Change-Id: Id3ca47b04227c1a5425eb156095a387f4cced06a
2018-01-12 00:17:04 +00:00
Alex Vakulenko
5a35f88cbb Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev
am: 9992c29071

Change-Id: I7aa6862055d7252b1c801b5deee4b81d7b707c4b
2018-01-12 00:12:38 +00:00
Android Merger
eeef276826 Merge "Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev am: 9992c29071" into oreo-mr1-cts-dev
am: 803a8520c2

Change-Id: I2feea16764dc7844a083e16df3e401b5158c11df
2018-01-12 00:12:10 +00:00
Alex Vakulenko
daf2e786d2 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev
am: 9992c29071

Change-Id: I5ea0bd658d11252b1c32cab7bedd1bfac8e80b26
2018-01-12 00:07:41 +00:00
Treehugger Robot
9992c29071 Merge "Add a delay before toggling WiFi to let listening activity to start up" into oreo-cts-dev 2018-01-12 00:01:30 +00:00
Chenbo Feng
0f27294a76 Merge "Check kernel version before running qtaguid test" am: 3b38b58b1f am: 6563bb9f75
am: 9e998c4312

Change-Id: I448478ec089c6fd9676ca3b034d8bc8c5ddad23b
2018-01-11 21:43:27 +00:00
Treehugger Robot
3b38b58b1f Merge "Check kernel version before running qtaguid test" 2018-01-11 21:18:47 +00:00
Sudheer Shanka
f54b3dd76a Update PROCESS_STATE_FOREGROUND_SERVICE constant value.
Bug: 71758358
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ia4509e94e33db5b61bf1aea704d25a199d381494
2018-01-11 12:44:58 -08:00
Chenbo Feng
3a9e2dc232 Check kernel version before running qtaguid test
The qtaguid module is required for devices running kernel earlier then
4.9, but is no longer avaliable after that. Add a check before running
the kernel qtaguid native test so it doesn't fail on new devices.

Bug: 30950746
Test: run cts -m CtsNativeNetTestCases
Change-Id: I32bc77a4c51d8b64ac1a5411c75c56a51b84ea77
2018-01-11 11:15:06 -08:00
Alex Vakulenko
9a35c697dc Add a delay before toggling WiFi to let listening activity to start up
testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent()
starts up a helper activity that listens to network connection/disconnection
notification. In many cases the test fails because the activity is just
able to start up and initialize itself before the first toggle event
arrives and in many cases it just misses by a matter of 100ms.

Added a short sleep after we start the activity and before we start
toggling WiFi to let the activity a chance to receive the first
notification.

Bug: 70988664
Change-Id: Ie122770fc8447a936d079fae7bdce61b10cf6dc2
2018-01-10 17:27:32 -08:00
Adam Vartanian
a02bbf31c4 DO NOT MERGE Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
(cherry picked from commit a01da8536c)
2018-01-08 13:33:23 -08:00
Sudheer Shanka
a353a9bf2b Merge "Skip unsupported tests on low ram devices." into stage-aosp-oc-mr1-cts-dev
am: e352866bee

Change-Id: I62d301dd0c4f026ea4f52de0ad706d50ff5382e4
2018-01-06 01:42:28 +00:00