Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run RVC test against the RVC example app in CI. #32079

Merged
merged 17 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/python_testing/TC_RVCCLEANM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

import logging
from time import sleep

import chip.clusters as Clusters
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
Expand Down Expand Up @@ -56,6 +57,10 @@ async def send_run_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunM
def write_to_app_pipe(self, command):
hicklin marked this conversation as resolved.
Show resolved Hide resolved
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
sleep(0.001)


def pics_TC_RVCCLEANM_2_1(self) -> list[str]:
return ["RVCCLEANM.S"]
Expand Down
5 changes: 4 additions & 1 deletion src/python_testing/TC_RVCCLEANM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import chip.clusters as Clusters
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from mobly import asserts

from time import sleep

class TC_RVCCLEANM_2_2(MatterBaseTest):

Expand Down Expand Up @@ -70,6 +70,9 @@ def pics_TC_RVCCLEANM_2_2(self) -> list[str]:
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

@async_test_body
async def test_TC_RVCCLEANM_2_2(self):
Expand Down
4 changes: 4 additions & 0 deletions src/python_testing/TC_RVCOPSTATE_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

import logging
from time import sleep

import chip.clusters as Clusters
from chip.clusters.Types import NullValue
Expand Down Expand Up @@ -63,6 +64,9 @@ async def send_pause_cmd(self) -> Clusters.Objects.RvcOperationalState.Commands.
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

def TC_RVCOPSTATE_2_1(self) -> list[str]:
return ["RVCOPSTATE.S"]
Expand Down
3 changes: 3 additions & 0 deletions src/python_testing/TC_RVCOPSTATE_2_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ async def send_run_change_to_mode_cmd(self, new_mode) -> Clusters.Objects.RvcRun
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

# Prints the instruction and waits for a user input to continue
def print_instruction(self, step_number, instruction):
Expand Down
4 changes: 4 additions & 0 deletions src/python_testing/TC_RVCOPSTATE_2_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

import logging
from time import sleep

import chip.clusters as Clusters
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
Expand Down Expand Up @@ -81,6 +82,9 @@ async def send_run_change_to_mode_cmd(self, new_mode):
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

def pics_TC_RVCOPSTATE_2_4(self) -> list[str]:
return ["RVCOPSTATE.S"]
Expand Down
4 changes: 4 additions & 0 deletions src/python_testing/TC_RVCRUNM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

import logging
from time import sleep

import chip.clusters as Clusters
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
Expand Down Expand Up @@ -51,6 +52,9 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunMode.
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

def pics_TC_RVCRUNM_2_1(self) -> list[str]:
return ["RVCRUNM.S"]
Expand Down
4 changes: 4 additions & 0 deletions src/python_testing/TC_RVCRUNM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import chip.clusters as Clusters
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from mobly import asserts
from time import sleep

# This test requires several additional command line arguments.
# Run the test with
Expand Down Expand Up @@ -91,6 +92,9 @@ async def read_op_state_operational_state(self) -> Clusters.Objects.RvcOperation
def write_to_app_pipe(self, command):
with open(self.app_pipe, "w") as app_pipe:
app_pipe.write(command + "\n")
# Allow some time for the command to take effect.
# This removes the test flakyness which is very annoying for everyone in CI.
sleep(0.001)

def pics_TC_RVCRUNM_2_2(self) -> list[str]:
return ["RVCRUNM.S"]
Expand Down
Loading