Holger Freyther has uploaded this change for review. (
https://gerrit.osmocom.org/9714
Change subject: ms: Attempt to stop all mobile/virtphy instances on exit
......................................................................
ms: Attempt to stop all mobile/virtphy instances on exit
We leave mobile/virtphy running after the test. Attempt to gracefully
exit and kill all of them. I experimented with both os.setpgrp and the
prctl(PR_SET_DEATH_SIG) but that didn't improve the situation.
Change-Id: I6cec050db7d4c355fb6678b2d84309fbbe5587b3
---
M src/osmo_ms_driver/__main__.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/14/9714/1
diff --git a/src/osmo_ms_driver/__main__.py b/src/osmo_ms_driver/__main__.py
index 7bca1d1..abc5e54 100644
--- a/src/osmo_ms_driver/__main__.py
+++ b/src/osmo_ms_driver/__main__.py
@@ -24,6 +24,7 @@
# System modules
import argparse
+import atexit
import datetime
import subprocess
import signal
@@ -78,6 +79,7 @@
# Just a single test for now.
test = MassUpdateLocationTest("lu_test", args.num_ms, cdf, ev_server,
tmp_dir)
+ atexit.register(test.stop_all)
# Run until everything has been launched
test.launch(loop)
--
To view, visit https://gerrit.osmocom.org/9714
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cec050db7d4c355fb6678b2d84309fbbe5587b3
Gerrit-Change-Number: 9714
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther <[email protected]>