Commit Graph

114 Commits

Author SHA1 Message Date
Valentin Iftime
9fa3509a51 API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
Chalard Jean
af718367c2 Factorize custom asserts.
Also a few utilities that were in the way, and some opportunistic
cleanups.

Test: FrameworksNetTest NetworkStackTest
Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
2019-06-20 16:24:25 +09:00
paulhu
c674eb967e Add SocketUtils CTS tests
Test APIs below:
makeNetlinkSocketAddress(int, int)
makePacketSocketAddress(short, int)
makePacketSocketAddress(int, byte[])
closeSocket(java.io.FileDescriptor)

Bug:129200596
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant

Change-Id: I395360161123d8b712b6c2cf3251b8144641350e
2019-06-14 15:33:52 +08:00
Paul Hu
a00c638ebe Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" 2019-05-15 03:42:32 +00:00
Paul Hu
cc8d6dd0bb Merge "Add ApfCapabilities common test cases" 2019-05-12 16:57:18 +00:00
paulhu
73f8eca8ad Add ApfCapabilities common test cases
Bug: 129199900
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I0c2aeaa1451e1f07edb0d0f8529e42e6fa107a6d
2019-05-10 16:03:42 +08:00
paulhu
9f7636c722 Add LinkProperties common test cases
Bug: 129198747
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I15b8dbd060c313d0f2be89fed4518c18b3196d38
2019-05-09 15:49:00 +08:00
paulhu
a3a7c6ef67 Ignore NetworkTest when running CtsNetTestCases in instant app mode
Ignore NetworkTest#testBindSocketOfConnectedDatagramSocketThrows
when running CtsNetTestCases in instant app mode due to sockect
cannot bind in instant app mode.

Bug: 123366918
Test: atest CtsNetTestCases --instant
Test: atest FrameworksNetTests
Change-Id: I37e5988b36213a6f47b51a681db1cf2614041cee
2019-05-03 22:28:22 +08:00
Paul Hu
ebf3945e1a Merge "Add CTS API coverage for APIs which are used by NetworkStack" 2019-05-02 01:37:26 +00:00
paulhu
e878a6c64f Add CTS API coverage for APIs which are used by NetworkStack
Change-Id: I4f6c34f3bcfa65e60cf73fc1b7cab2d83c32836a
Bug: 129200003
Bug: 129200292
Bug: 129199996
Bug: 129200261
Bug: 129200513
Bug: 129200316
Bug: 129200589
Bug: 129200181
Bug: 129200669
Bug: 129200504
Bug: 129200478
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
2019-04-30 17:26:24 +08:00
paulhu
89d49e7bd4 Add Network, NetworkCapabilities, StaticIpConfiguration common test cases
Bug: 129200415
Bug: 129200142
Bug: 129200418
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I568d516e1ffc9e32061ca6860224c102bdfd7445
2019-04-29 18:13:00 +08:00
Remi NGUYEN VAN
71a25d5827 Add tests for DhcpErrorEvent
The tests are run both in unit and CTS tests.
Test: atest FrameworksNetTests NetworkStackTestCases
Bug: 129200175

Change-Id: I52976bbbaca26fb317836e8461e372c25df02a22
2019-04-23 00:19:06 +08:00
Remi NGUYEN VAN
5564d5a8f6 Move more network unit tests to common tests
This adds the moved tests to CTS as well.
The moved unit tests are appropriate for CTS as they test data holder
classes that need to function properly for apps to work.

Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Bug: 129199900
Change-Id: I4c3d31ed595024af84093ca9110ed43633c383f4
2019-04-12 14:51:22 +09:00
Remi NGUYEN VAN
49b15870a9 Add common tests for FrameworksBaseTests and CTS
The common package covers tests that should be included both in CTS and
unit tests.

Test: atest FrameworksBaseTests
Bug: 129199908
Change-Id: I9c138d49ce010edde095e4bd3c47e36ca301634a
2019-04-03 18:53:04 +09:00