Commit graph android_packages_modules_Co.../staticlibs/testutils/host/python
Message SHA1
Remove packet type and dst mac when sending raw packet
This is now derived from the passed packet data by
NetworkStack.

Test: m connectivity_multi_devices_snippet && \
      atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: Ida06c00e6f499b782cb903c9fa0a4154c2d8cf84

Junyu Lai   commited 2024-07-03 12:33:11 +08:00
161dc10f60
Add support for sending raw packets
This commit includes several new functions to support sending custom
raw Ethernet packets. This includes methods for retrieving
MAC addresses, sending empty EtherCAT packets, and sending
arbitrary raw packets with specified types and destinations.
These functions are primarily intended for testing purposes
and rely on the `send-raw-packet-downstream` command provided
by NetworkStack.

Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: Iae7879bf92e1dda8fbd32b92ff166e82c87593c7

Junyu Lai   commited 2024-07-01 16:53:50 +08:00
4a1baf042b
Add apf_utils for multi-device tests
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: I79064abcb88fbcee00ec9ec998ba5a3e2d3478a6

Junyu Lai   commited 2024-07-01 13:44:12 +08:00
b0f759c42a
Add adb_utils for multidevice test
This commit adds the necessary code for 'adb_utils' to enable APF
multi-device testing which will be introduced in follow-up patches.
This includes utilities of issuing shell command, parsing dumpsys
key-value pairs, controlling doze mode and screen state.

Additionally, unit tests are added to verify the basic functionality.

Test: atest NetworkStaticLibHostPythonTests

Bug: 335368434
Change-Id: I580e91b494580ec9105c8988972845d38c104031

Junyu Lai   commited 2024-07-01 13:33:13 +08:00
bed4480ffd
Add assert_utils for multidevice test
Test: atest NetworkStaticLibHostPythonTests
Bug: 335368434
Change-Id: I2a9ee97b84cb16791c0c5e3cb03120e67ffeb0af

Junyu Lai   commited 2024-07-01 12:23:59 +08:00
850e6fae54
Move utils to staticlib
This is a no-op refactoring.

Test: m connectivity_multi_devices_snippet && \
      atest CtsConnectivityMultiDevicesTestCases
Bug: 335368434
Change-Id: I415cc22f49c437be6fe8e8ae8822af22ebefe8d1

Junyu Lai   commited 2024-06-28 11:19:54 +08:00
79b771f9bb