This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/1928
osmoutil: end_proc: speed up tests yet a bit more
Recent commit b59b677c9b13483aac72b15f4f797863d841d958 called proc.terminate()
instead of killing right away, with a .1 second sleep. Reduce this sleep to
unnoticeable 0.01 seconds -- for me, all tests terminate, no kill is needed.
Print a message only in case of kill, the "Terminated child process" message
was bloating the log.
Change-Id: I6fd520bae81be129e23a48e3daa122e6bae5630d
---
M osmopy/osmoutil.py
1 file changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/28/1928/1
diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py
index 01f74cc..cb3cb6a 100755
--- a/osmopy/osmoutil.py
+++ b/osmopy/osmoutil.py
@@ -46,13 +46,12 @@
return
proc.terminate()
- time.sleep(.1)
+ time.sleep(.01)
rc = proc.poll()
- if rc is not None:
- print "Terminated child process"
- else:
- proc.kill()
+ if rc is None:
+ # termination seems to be slower than that, let's just kill
print "Killed child process"
+ proc.kill()
proc.wait()
--
To view, visit https://gerrit.osmocom.org/1928
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fd520bae81be129e23a48e3daa122e6bae5630d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>