Commit Graph

16 Commits

Author SHA1 Message Date
Treehugger Robot
d9b892c147 Merge "Add more tests to CtsTetheringTest" 2020-04-17 05:04:53 +00:00
paulhu
85f0fca1f0 Add more tests to CtsTetheringTest
Add TetheringIntegrationTests into CtsTetheringTest

Bug: 148636687
Test: atest CtsTetheringTest
      atest TetheringIntegrationTests
Change-Id: I606097a8db9ed3d2b3eaf933bb1d904e437ab27d
2020-04-16 20:20:08 +08:00
paulhu
3936e08f65 Add EntitlementResult CTS tests
Test APIs below:
requestLatestTetheringEntitlementResult(int, boolean,
  java.util.concurrent.Executor,
  android.net.TetheringManager.OnTetheringEntitlementResultListener)
requestLatestTetheringEntitlementResult(int,
  android.os.ResultReceiver, boolean)
OnTetheringEntitlementResultListener.onTetheringEntitlementResult(int)

Bug: 152829363
Test: atests CtsTetheringTest
Change-Id: Icf0d9cacd97eeaa7ceb78f4924c5a6be6e588b30
2020-04-16 11:12:56 +08:00
Paul Hu
ca10520cbf Merge "Add TetheringEventCallback CTS test" 2020-04-15 10:32:27 +00:00
paulhu
7f1975092f Add TetheringEventCallback CTS test
Test APIs below:
onOffloadStatusChanged(int)

Bug: 153619369
Test: atests CtsTetheringTest
Change-Id: Ia7edd0d3d8184e30373ac8b657299107ff9b4c1e
2020-04-14 19:12:46 +08:00
Paul Hu
b647a5b483 Merge "Add TetherableInterfaceRegexps CTS tests" 2020-04-14 08:18:27 +00:00
Chalard Jean
9e5d061d73 Add tethering CTS owners.
Test: none
Change-Id: I552b3bf8d79c4e4480396edc201b51ec5901b87b
2020-04-13 17:40:32 +09:00
paulhu
ed041b098a Add TetherableInterfaceRegexps CTS tests
Test APIs below:
getTetherableWifiRegexs()
getTetherableUsbRegexs()
getTetherableBluetoothRegexs()
TetheringInterfaceRegexps.getTetherableWifiRegexs()
TetheringInterfaceRegexps.getTetherableUsbRegexs()
TetheringInterfaceRegexps.getTetherableBluetoothRegexs()

Bug: 152737526
Test: atest CtsTetheringTest
Change-Id: Icb7d8718d0aa6574b4c9dd1e17d7feb300fad2aa
2020-04-10 09:21:41 +08:00
markchien
64522ba4ea Add testRegisterTetheringEventCallback for CtsTetheringTest
Bug: 150632712
Bug: 150631563
Test: atest CtsTetheringTest

Change-Id: I55895c8b26acb7ec905d75d1f4b2a8964b13187a
2020-04-07 12:14:03 +08:00
paulhu
ae7a0709b3 Add TetheringRequest CTS tests
Test APIs below:
TetheringRequest.getClientStaticIpv4Address()
TetheringRequest.getLocalIpv4Address()
TetheringRequest.getShouldShowEntitlementUi()
TetheringRequest.getTetheringType()
TetheringRequest.isExemptFromEntitlementCheck()
TetheringRequest.Builder(int)
TetheringRequest.Builder.build()
TetheringRequest.Builder.setExemptFromEntitlementCheck(boolean)
TetheringRequest.Builder.setShouldShowEntitlementUi(boolean)
TetheringRequest.Builder.setStaticIpv4Addresses( \
  android.net.LinkAddress, android.net.LinkAddress)

Bug: 150632842
Test: atest CtsTetheringTest
Change-Id: Ice5aefa1bacc1a635a7a79ce91d5d30ec5dcf335
2020-04-01 09:26:35 +08:00
markchien
df5e422993 Clean up for TetheringManager API change
Bug: 149858697
Bug: 151243337
Test: atest CtsTetheringTest
Change-Id: I817cb62f0f41d72e861952394ac8fbbfdc360f11
Merged-In: I817cb62f0f41d72e861952394ac8fbbfdc360f11
2020-03-19 11:46:11 +00:00
markchien
cdd2b36062 Fix testStartTetheringWithStateChangeBroadcast flaky
Before this change the test assume one active state event is followed by
zero or one availabe event:
AVAIALBE(wlan1) -> ACTIAVE(wlan1) -> AVAILALE(wlan1)

But actually Multiple tetherable wifi interfaces may be avaialbe during
the test:
AVAILABLE(wlan1) -> AVALIABLE(wlanX) -> .... -> ACTIVE(wlan1) ->
AVAIALBE(wlan1)

Additional, replacing ConnectivityManager usage to TetheringManager.

Bug: 148095484
Test: atest CtsTetheringTest
Change-Id: Id5db970c02f63f61802a18b599bf6905db619b42
2020-02-14 18:22:43 +08:00
jovanak
72a8efb9c0 CtsTetheringTest secondary_user
Marks this CTS test module as supporting secondary_user, meaning that
the tests are eligible to be run from a regular Android user other
than the system user (i.e. other than user 0).

Note that 'user' here refers to the concept of users in Android
Multiuser; it is NOT the same as a uid.

Bug: 141773058
Test: module passed with secondary_user params
 (--enable-optional-parameterization --module-parameter secondary_user)

Change-Id: I92d97cae99418dac3cd6e1cbb625b12f0c2cc60a
2020-01-14 16:18:41 -08: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
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
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