Skip to content
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
5 changes: 3 additions & 2 deletions framework/python/src/core/testrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,13 @@ def start(self):

def stop(self):

# First, change the status to stopping
self.get_session().stop()

# Prevent discovering new devices whilst stopping
if self.get_net_orc().get_listener() is not None:
self.get_net_orc().get_listener().stop_listener()

self.get_session().stop()

self._stop_tests()
self._stop_network(kill=True)
self.get_session().set_status(TestrunStatus.CANCELLED)
Expand Down
5 changes: 4 additions & 1 deletion framework/python/src/net_orc/network_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ def _start_device_monitor(self, device):
time.sleep(1)

# Check Testrun hasn't been cancelled
if self._session.get_status() == TestrunStatus.CANCELLED:
if self._session.get_status() in (
TestrunStatus.STOPPING,
TestrunStatus.CANCELLED
):
sniffer.stop()
return

Expand Down