osmotestconfig: fix socket leak

Each running test would open up another socket without ever closing unused
ones. Close the sockets after each test is done.

Change-Id: If97944a079e901439139161eae39181f5c800200
This commit is contained in:
Neels Hofmeyr 2017-02-24 20:49:34 +01:00
parent 3ef39e9b9e
commit 8972d06754
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,7 @@ def test_config(app_desc, config, tmpdir, verbose=True):
def test_config_atest(app_desc, config, run_test, verbose=True):
proc = None
ret = None
vty = None
try:
cmd = app_desc[1].split(' ') + [ "-c", config]
if verbose:
@ -69,6 +70,8 @@ def test_config_atest(app_desc, config, run_test, verbose=True):
finally:
if proc:
osmoutil.end_proc(proc)
if vty:
vty._close_socket()
return ret