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

Fix decommissioning problem for simulated test cases #13

Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions app/chip_tool/chip_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ def destroy_device(self) -> None:
container_manager.destroy(self.__chip_tool_container)
self.__chip_tool_container = None

async def start_runner(self) -> None:
await self.__test_harness_runner.start()

async def stop_runner(self) -> None:
await self.__test_harness_runner.stop()

def send_command(
self,
command: Union[str, list],
Expand Down
7 changes: 7 additions & 0 deletions app/chip_tool/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,16 @@ async def cleanup(self) -> None:
logger.info("Unpairing chip_tool from device")
await self.chip_tool.unpair()
# Need a better way to trigger unpair for chip-app.
# Currently the runner is being stopped automatically once
# the test completes. So we need to start it again to
# perform decommissioning
elif self.test_type == ChipToolTestType.CHIP_APP:
logger.info("Run simulated app instance to perform decommissioning")
await self.chip_tool.start_runner()
logger.info("Prompt user to perform decommissioning")
await self.__prompt_user_to_perform_decommission()
logger.info("Stop simulated app instance")
await self.chip_tool.stop_runner()

logger.info("Stopping chip-tool container")
self.chip_tool.destroy_device()
Expand Down