diff options
author | Hyun Jae Moon <hyunjaemoon@google.com> | 2024-03-22 20:12:14 +0000 |
---|---|---|
committer | Hyun Jae Moon <hyunjaemoon@google.com> | 2024-03-22 20:12:14 +0000 |
commit | 98ae0fac626707cdefdc59a959d86c9f934dde4e (patch) | |
tree | 5ead59aa8b05c15812d9636a13619e9b5f1f0942 | |
parent | 181a1f22e1720f0301434fb699aecfb6a5db0d66 (diff) | |
download | adt-infra-emu-34-2-dev.tar.gz |
Remove netsim frontend tests for emu-34-2-devemu-34-2-dev
Change-Id: Icad9fb5f3dec9149168e407b21af6b04e9bae2f4
-rw-r--r-- | pytest/test_embedded/tests/files/test_zip_distribution.py | 4 | ||||
-rw-r--r-- | pytest/test_embedded/tests/netsim/test_handle_devices.py | 73 |
2 files changed, 0 insertions, 77 deletions
diff --git a/pytest/test_embedded/tests/files/test_zip_distribution.py b/pytest/test_embedded/tests/files/test_zip_distribution.py index d26c2180..78cd2883 100644 --- a/pytest/test_embedded/tests/files/test_zip_distribution.py +++ b/pytest/test_embedded/tests/files/test_zip_distribution.py @@ -47,7 +47,6 @@ def get_expected_files(): "mksdcard", "nimble_bridge", "emulator", - "netsim", ] exp_files_win = [ @@ -65,7 +64,6 @@ def get_expected_files(): "mksdcard.exe", "nimble_bridge.exe", "emulator.exe", - "netsim.exe", "android-emu-agents.lib", "concrt140.dll", "libandroid-emu-agents.dll", @@ -134,7 +132,6 @@ def get_exp_sub_dirs(): "libprotobuf.32.dylib", "vulkan", ], - "netsim-ui": ["assets", "index.html", "js", "node_modules"], "resources": [ "Toren1BD.mtl", "Toren1BD.posters", @@ -210,7 +207,6 @@ def get_exp_sub_dirs(): "gles_mesa", "concrt140.dll", ], - "netsim-ui": ["assets", "index.html", "js", "node_modules"], "resources": [ "Toren1BD.mtl", "Toren1BD.posters", diff --git a/pytest/test_embedded/tests/netsim/test_handle_devices.py b/pytest/test_embedded/tests/netsim/test_handle_devices.py deleted file mode 100644 index b1dab0bb..00000000 --- a/pytest/test_embedded/tests/netsim/test_handle_devices.py +++ /dev/null @@ -1,73 +0,0 @@ -import pytest -from netsim_grpc import netsim_client - - -@pytest.mark.e2e -@pytest.mark.boot -def test_device_attaches_to_netsimd(avd): - """Test case to verify that a device is attached to netsimd.""" - assert len(netsim_client.NetsimClient().get_devices()) != 0 - - -@pytest.mark.e2e -@pytest.mark.boot -def test_netsim_patch_and_reset(avd): - """Test case to verify that patch and reset device in netsim""" - initial_devices = netsim_client.NetsimClient().get_devices() - assert len(initial_devices) != 0 - - # Patch Device Position and Orientation - device_name = list(initial_devices.keys())[0] - patch_position = netsim_client.model.Position(x=1, y=2, z=3) - patch_orientation = netsim_client.model.Orientation(yaw=30, pitch=60, roll=90) - assert netsim_client.NetsimClient().set_position( - device_name, position=patch_position, orientation=patch_orientation - ) - - # Verfiy the new Position and Orientation - post_patch_device = netsim_client.NetsimClient().get_devices()[device_name] - assert post_patch_device.position == patch_position - assert post_patch_device.orientation == patch_orientation - - # Attempt Reset and Verify with Position and Orientation - netsim_client.NetsimClient().reset() - post_reset_device = netsim_client.NetsimClient().get_devices()[device_name] - assert post_reset_device.position == netsim_client.model.Position(x=0, y=0, z=0) - assert post_reset_device.orientation == netsim_client.model.Orientation( - yaw=0, pitch=0, roll=0 - ) - - -@pytest.mark.e2e -@pytest.mark.boot -def test_netsim_radio_state_toggle(avd): - """Test case to verify patch radio in netsim""" - initial_devices = netsim_client.NetsimClient().get_devices() - assert len(initial_devices) != 0 - - # Turn off Radio State (BLE) of Device and Verify - device_name = list(initial_devices.keys())[0] - patch_radio = netsim_client.model.PhyKind.BLUETOOTH_LOW_ENERGY - patch_state = False - netsim_client.NetsimClient().set_radio(device_name, patch_radio, patch_state) - post_patch_device = netsim_client.NetsimClient().get_devices()[device_name] - for chip in post_patch_device.chips: - if chip.kind == netsim_client.common.ChipKind.BLUETOOTH: - assert chip.bt.low_energy.state == netsim_client.model.State.OFF - - # Turn on Radio State (BLE) of Device and Verify - patch_state = True - netsim_client.NetsimClient().set_radio(device_name, patch_radio, patch_state) - post_patch_device = netsim_client.NetsimClient().get_devices()[device_name] - for chip in post_patch_device.chips: - if chip.kind == netsim_client.common.ChipKind.BLUETOOTH: - assert chip.bt.low_energy.state == netsim_client.model.State.ON - - # Turn off Radio State (BLE) of Device, Reset and Verify if it's on - patch_state = False - netsim_client.NetsimClient().set_radio(device_name, patch_radio, patch_state) - netsim_client.NetsimClient().reset() - post_patch_reset_device = netsim_client.NetsimClient().get_devices()[device_name] - for chip in post_patch_reset_device.chips: - if chip.kind == netsim_client.common.ChipKind.BLUETOOTH: - assert chip.bt.low_energy.state == netsim_client.model.State.ON |