Commit Graph

4033 Commits

Author SHA1 Message Date
David Su
656e4768c3 CtsNetTestCases: fix Wifi @hide usages
Remove CTS @hide Wifi API usages.

Bug: 144036594
Test: atest CtsNetTestCases
Change-Id: I88de956a56f81212133d1da48d5217b282bc10c1
2020-01-10 13:43:37 -08:00
Colin Cross
f7d2ff895e Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
cts/hostsidetests/net/app/src/com/android/cts/net/hostside/RequiredPropertiesRule.java:61: error: [CollectionIncompatibleType] Argument '~requiredProperty.getValue()' should not be passed to this method; its type int is not compatible with its collection's type argument Property
cts/tests/location/location_fine/src/android/location/cts/fine/CriteriaTest.java:199: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
cts/tests/location/location_fine/src/android/location/cts/fine/LocationManagerFineTest.java:948: error: [TryFailThrowable] Catching Throwable/Error masks failures from fail() or assert*() in the try block
cts/tests/location/location_fine/src/android/location/cts/fine/LocationTest.java:402: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
cts/tests/tests/assist/src/android/assist/cts/AssistTestBase.java:613: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
cts/tests/tests/assist/src/android/assist/cts/AssistTestBase.java:616: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
cts/tests/tests/media/src/android/media/cts/AudioRecordTest.java:1661: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
cts/tests/tests/media/src/android/media/cts/AudioRecordTest.java:1681: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.

Bug: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I48b1ccb61c807d0b41a165298ef5981258d6656e
2019-12-31 09:40:49 -08:00
Automerger Merge Worker
2644c4f485 Merge "fix the problem that testNetworkSettingsPermission case can not detect all apps whose holding the NETWORK_SETTINGS permission" am: 9228a471cc am: 8634565225 am: 1737d5d1ac
Change-Id: I44338c18e76930f54230b31ee4a0834d9b047f25
2019-12-24 02:06:31 +00:00
Automerger Merge Worker
1737d5d1ac Merge "fix the problem that testNetworkSettingsPermission case can not detect all apps whose holding the NETWORK_SETTINGS permission" am: 9228a471cc am: 8634565225
Change-Id: I0f3f4139fc7dc534699a6642672f7515002fc2f3
2019-12-24 01:52:52 +00:00
qianyou
8634565225 Merge "fix the problem that testNetworkSettingsPermission case can not detect all apps whose holding the NETWORK_SETTINGS permission"
am: 9228a471cc

Change-Id: I32edc7a87d1c0b49a44806c89407a2f644b94110
2019-12-23 17:41:05 -08:00
Treehugger Robot
9228a471cc Merge "fix the problem that testNetworkSettingsPermission case can not detect all apps whose holding the NETWORK_SETTINGS permission" 2019-12-24 01:36:56 +00:00
Automerger Merge Worker
b7f1851cd6 Merge "Fix Error Prone errors" am: 72acd372b2 am: bbf2f80c02 am: 311b4e40df
Change-Id: I37c3d645d88c7c8a0b68b657b8699864d1801e20
2019-12-20 21:23:06 +00:00
Automerger Merge Worker
311b4e40df Merge "Fix Error Prone errors" am: 72acd372b2 am: bbf2f80c02
Change-Id: If25e24771a7ec33681e2cc3c0ca210351e66deab
2019-12-20 21:19:35 +00:00
Colin Cross
bbf2f80c02 Merge "Fix Error Prone errors"
am: 72acd372b2

Change-Id: I3c095bc457071fd46ffb1b5566c5d26fdca01a95
2019-12-20 13:08:01 -08:00
Colin Cross
72acd372b2 Merge "Fix Error Prone errors" 2019-12-20 21:02:06 +00:00
qianyou
b4d1e75085 fix the problem that testNetworkSettingsPermission case can not detect all apps whose holding the NETWORK_SETTINGS permission
This test case stop when detect a app failure once a time, which cannot find out all app failure. Use StringBuilder to collect failure info of all apps first, if the StringBuilder is not empty then print all the failure info.

Bug:145475188
Test: run cts -m CtsNetTestCases -t android.net.wifi.cts.WifiManagerTest#testNetworkSettingsPermission

Change-Id: I0e49b65bbe7deca82edd1908dfb6f221551ff725
Signed-off-by: qianyou <qianyou@xiaomi.com>
(cherry picked from commit dcb3a18cbf81f2970d6c3b23a478da5b4ba91805)
2019-12-20 01:25:01 +00:00
Etan Cohen
2c9f4bf117 Merge "[AWARE] Add API to expose supported cipher suites" 2019-12-20 01:07:49 +00:00
Automerger Merge Worker
0a97edb99f Merge "Add cts for MacAddress public API" am: 0f364ba113 am: d35360b193 am: cfd433d999
Change-Id: Ib99db4fb43bbcc4bff9d233c05bccde6f62604af
2019-12-19 08:38:59 +00:00
Automerger Merge Worker
cfd433d999 Merge "Add cts for MacAddress public API" am: 0f364ba113 am: d35360b193
Change-Id: I4f3f11fa123099ff464a77d06a0b768c47c8302f
2019-12-19 08:22:29 +00:00
Aaron Huang
d35360b193 Merge "Add cts for MacAddress public API"
am: 0f364ba113

Change-Id: I7e1f870ecc47fda0e3691782389cb2920e76fd13
2019-12-19 00:10:09 -08:00
Aaron Huang
0f364ba113 Merge "Add cts for MacAddress public API" 2019-12-19 08:02:20 +00:00
Colin Cross
284371356c Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/LockTaskHostDrivenTest.java:50: error: [JUnitAmbiguousTestClass] Test class inherits from JUnit 3's TestCase but has JUnit 4 @Test annotations.
cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/LockTaskTest.java:51: error: [JUnitAmbiguousTestClass] Test class inherits from JUnit 3's TestCase but has JUnit 4 @Test annotations.
cts/tests/tests/telephony/current/src/android/telephony/cts/CarrierServiceTest.java:34: error: [JUnitAmbiguousTestClass] Test class inherits from JUnit 3's TestCase but has JUnit 4 @Test annotations.
cts/tests/tests/tethering/src/android/tethering/cts/TetheringManagerTest.java:166: error: [ArrayToString] Calling toString on an array does not provide useful information
cts/tests/tests/tethering/src/android/tethering/cts/TetheringManagerTest.java:172: error: [ArrayToString] Calling toString on an array does not provide useful information

Bug: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I949e409fd7ba80ab8937db1c08eaaaf9608b17ed
2019-12-18 14:08:48 -08:00
David Su
0862b9f616 Merge "Use public getters for WifiP2pConfig fields" 2019-12-18 18:15:24 +00:00
Automerger Merge Worker
3d17e4ba40 Merge "Add mts tag to the build file for MTS testing" am: fd1f875e39 am: c0eaab2bd8 am: f0d974fcb8
Change-Id: I70e13e1861c48cbf26b38dfcd09e1a3ce1e6fee6
2019-12-18 10:28:08 +00:00
Automerger Merge Worker
f0d974fcb8 Merge "Add mts tag to the build file for MTS testing" am: fd1f875e39 am: c0eaab2bd8
Change-Id: I79bbfb7858d7928b40702691a5fb5f2673f986ba
2019-12-18 10:16:17 +00:00
markchien
c0eaab2bd8 Merge "Add mts tag to the build file for MTS testing"
am: fd1f875e39

Change-Id: Ida08be7794032867536fbeb12e59f572aee70673
2019-12-18 02:03:27 -08:00
David Su
58657a93a1 Use public getters for WifiP2pConfig fields
CTS cannot test @hide fields, need to use public
getters instead.

Bug: 146463839
Test: atest WifiP2pConfigTest
Change-Id: I182a232d64e3ad66664ee78c96c0f73ea5c08386
2019-12-17 21:33:51 -08:00
markchien
9ccf3d87fb Add mts tag to the build file for MTS testing
Bug: 145490751
Test: build, atest CtsTetheringTest
Change-Id: I993ce5ec89ab98de7eadaf6624a30a37851ca716
2019-12-18 11:55:32 +08:00
Automerger Merge Worker
bd6ec258b7 Merge "Create new CTS test for tethering" am: b376f283cb am: 235a625d30 am: 84b44168a3
Change-Id: I35cc9b37af6b18df39ba8b4941be59830d71b3f9
2019-12-17 15:35:26 +00:00
Automerger Merge Worker
84b44168a3 Merge "Create new CTS test for tethering" am: b376f283cb am: 235a625d30
Change-Id: I5019dd909344341dd861e8c0c3dd75e6e4d61799
2019-12-17 15:23:19 +00:00
Mark Chien
235a625d30 Merge "Create new CTS test for tethering"
am: b376f283cb

Change-Id: I436030e7820cec499d1d735b4087d091ac9b812d
2019-12-17 07:08:03 -08:00
markchien
fb904c36de Create new CTS test for tethering
Initial CTS test for tethering.
This change test startTethering/stopTethering and check
status of TETHER_STATE_CHANGE intent.

Bug: 145490751
Test: atest CtsTetheringTest
Change-Id: Ia1ae3b6c2b68b009ca4deef840945186d472d99e
2019-12-16 19:53:15 +08:00
Aaron Huang
593054729c Add cts for MacAddress public API
Add test for new public APIs

Test: atest android.net.cts.MacAddressTest
Bug: 139268426
Bug: 135998869
Change-Id: Ib2b73851f621f1648904276ec12ceea02f4b5970
2019-12-16 17:11:34 +08:00
Etan Cohen
3a90dcdb60 [AWARE] Add API to expose supported cipher suites
Provide a new Aware capabilities API which exposes the supported
cipher suites. These cipher suites are used to negotiate the data-
path. The framework automatially selects the strongest cipher suite
when it initiates a negotiation.

Bug: 145697276
Test: (CTS) atest SingleDeviceTest
Change-Id: Ifc735978aecf3a655ca3115a4659e636f69ebf31
2019-12-13 18:33:16 -08:00
Automerger Merge Worker
e7143619a3 [automerger skipped] Merge "Add a CTS test for private DNS on VPNs." into pi-dev am: a7df60640f -s ours am: ea28c5a250 -s ours am: 45fc9d14d6 -s ours am: 26cf62857d -s ours am: 0053fec176 -s ours
am skip reason: Change-Id Ifa2710aed7e773a24786cc3e4912f126547dfe0b with SHA-1 3b160e2385 is in history

Change-Id: I5c624fef2085d31408a1afd971fc1eb17f094365
2019-12-13 08:37:34 +00:00
Automerger Merge Worker
0053fec176 [automerger skipped] Merge "Add a CTS test for private DNS on VPNs." into pi-dev am: a7df60640f -s ours am: ea28c5a250 -s ours am: 45fc9d14d6 -s ours am: 26cf62857d -s ours
am skip reason: Change-Id Ifa2710aed7e773a24786cc3e4912f126547dfe0b with SHA-1 3b160e2385 is in history

Change-Id: I7182910f244b1c0adcb254adeb6fb5c20da5f4d4
2019-12-13 08:25:16 +00:00
Automerger Merge Worker
45fc9d14d6 [automerger skipped] Merge "Add a CTS test for private DNS on VPNs." into pi-dev am: a7df60640f -s ours am: ea28c5a250 -s ours
am skip reason: Change-Id Ifa2710aed7e773a24786cc3e4912f126547dfe0b with SHA-1 3b160e2385 is in history

Change-Id: I74865316a615b0a7e96b02b61133dc03cb8bec15
2019-12-13 07:51:11 +00:00
Automerger Merge Worker
ea28c5a250 [automerger skipped] Merge "Add a CTS test for private DNS on VPNs." into pi-dev am: a7df60640f -s ours
am skip reason: Change-Id Ifa2710aed7e773a24786cc3e4912f126547dfe0b with SHA-1 3b160e2385 is in history

Change-Id: I351adf65d7cefb1a97ddee9a80ed9978b28d0187
2019-12-13 07:31:21 +00:00
Automerger Merge Worker
0fdd1ee38b Merge "Add a CTS test for private DNS on VPNs." into qt-dev am: 17311d9af6 am: fe44dd21ba am: 523cc30322 am: b29ba93dcd
Change-Id: I20a4d12beb846fa0d192e6426719c762ffb0c187
2019-12-13 02:27:54 +00:00
Automerger Merge Worker
b29ba93dcd Merge "Add a CTS test for private DNS on VPNs." into qt-dev am: 17311d9af6 am: fe44dd21ba am: 523cc30322
Change-Id: If38d0c7e8b878e76ff4a52fcdd441b002ce9ddf0
2019-12-13 01:41:48 +00:00
Automerger Merge Worker
fe44dd21ba Merge "Add a CTS test for private DNS on VPNs." into qt-dev am: 17311d9af6
Change-Id: I31b248ede81bc423d91ba747cc6a8275a4be4f81
2019-12-13 01:05:22 +00:00
Lorenzo Colitti
3b160e2385 Add a CTS test for private DNS on VPNs.
Bug: 122652057
Test: atest com.android.cts.net.HostsideVpnTests passes with fix, fails without it
Change-Id: Ifa2710aed7e773a24786cc3e4912f126547dfe0b
2019-12-12 19:41:01 +09:00
Lorenzo Colitti
7064ea15bb Add a CTS test for private DNS on VPNs.
Bug: 122652057
Test: atest com.android.cts.net.HostsideVpnTests passes with fix, fails without it
Change-Id: Idc0690dfe6d000337b272bbd55ea4d773aebd5ed
Merged-In: Ifa2710aed7e773a24786cc3e4912f126547dfe0b
2019-12-12 19:36:20 +09:00
Lorenzo Colitti
ff7fa516a7 Merge "Improve code that decides whether Ethernet should be supported." am: 7b63a9afdf am: f4739d85d8
am: 96f2a111bb

Change-Id: I1af6f1331a0ab71e7dc5adfe7b92d9285285b356
2019-12-06 00:28:55 -08:00
Lorenzo Colitti
96f2a111bb Merge "Improve code that decides whether Ethernet should be supported." am: 7b63a9afdf
am: f4739d85d8

Change-Id: Ifaff2fa1b8e9dc329b42d6e845851a524b6bb6fc
2019-12-04 23:31:55 -08:00
Lorenzo Colitti
f4739d85d8 Merge "Improve code that decides whether Ethernet should be supported."
am: 7b63a9afdf

Change-Id: I94442f7818b3da94f468c0532c3eb8013cd959d3
2019-12-04 23:27:37 -08:00
Lorenzo Colitti
7b63a9afdf Merge "Improve code that decides whether Ethernet should be supported." 2019-12-05 07:18:03 +00:00
Lorenzo Colitti
cde74dff5d Improve code that decides whether Ethernet should be supported.
Currently, ConnectivityManagerTest checks whether the device
supports Ethernet by checking whether the OEM has configured it
in the networkAttributes array, or whether the Ethernet service
is running. It does this because devices that support USB host
mode enable Ethernet even if the OEM does not add Ethernet to
the networkAttributes array.

Unfortunately this does not work in instant mode because instant
apps cannot query the Ethernet service due to selinux policies.
In addition to querying whether the service is running (which
will continue to work in non-instant mode), also assume that
Ethernet is supported if the FEATURE_ETHERNET or FEATURE_USB_HOST
PackageManager flags are present.

This fixes various ConnectivityManagerTest testcases on devices
that support USB host mode but where the OEM has not added
Ethernet to the networkAttributes array.

Bug: 137630789
Bug: 143850345
Bug: 145482540
Test: atest android.net.cts.ConnectivityManagerTest#testIsNetworkSupported
Test: atest --instant android.net.cts.ConnectivityManagerTest#testIsNetworkSupported
Change-Id: Ie8a701f607967576a45c6b3c4f25c9c003aa3165
2019-12-05 13:39:00 +09:00
Tomasz Wasilczyk
ad5f37b5b8 Merge "Add extra check for NetworkWatchlistTest" am: f4130d6822 am: a09b433e06
am: d6398544a6

Change-Id: Iec9accd18920cb742cfe4d976c5d0343c6f5b639
2019-12-04 17:17:14 -08:00
Tomasz Wasilczyk
d6398544a6 Merge "Add extra check for NetworkWatchlistTest" am: f4130d6822
am: a09b433e06

Change-Id: I0b7babfb4b0e919136e6dd069c61f223c6039af5
2019-12-04 10:28:53 -08:00
Tomasz Wasilczyk
a09b433e06 Merge "Add extra check for NetworkWatchlistTest"
am: f4130d6822

Change-Id: I196889432036b9232507f926f8bee9376ecd0636
2019-12-04 10:24:40 -08:00
Treehugger Robot
f4130d6822 Merge "Add extra check for NetworkWatchlistTest" 2019-12-04 18:17:43 +00:00
Automerger Merge Worker
ca9ba2b23d Merge "Merge Android10 QPR1 into AOSP master" am: e409ded183 am: cd6cd0915d
Change-Id: I9055a6ea3ab160adf780b6e39d6ee344ab65a7a3
2019-12-04 16:58:08 +00:00
Xin Li
cd6cd0915d Merge "Merge Android10 QPR1 into AOSP master" am: e409ded183
am: 08da6f5b47

Change-Id: Icd21a86ae81199047ccc33bbc44a622ad2e51a6d
2019-12-04 08:07:53 -08:00
Xin Li
08da6f5b47 Merge "Merge Android10 QPR1 into AOSP master"
am: e409ded183

Change-Id: Idcdacfb27901a118b4e0a52d77436e30f8d5d3e5
2019-12-03 16:07:49 -08:00