fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33140 )
Change subject: tests/{ctrl,vty}_test_runner.py: raise an exception if proc's rc != 0 ......................................................................
tests/{ctrl,vty}_test_runner.py: raise an exception if proc's rc != 0
Change-Id: I5fa3477979d41aef7b22464a925941ed0f115193 Depends: osmo-python-tests.git I1e11fcb6c5a587c27fc00920b6e157862d972fd9 Related: OS#5665 --- M tests/ctrl_test_runner.py M tests/vty_test_runner.py 2 files changed, 17 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index e889992..7808426 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -63,7 +63,9 @@
def tearDown(self): self.disconnect() - osmoutil.end_proc(self.proc) + rc = osmoutil.end_proc(self.proc) + if rc is not None and rc != 0: + raise Exception("Process returned %d" % rc)
def disconnect(self): if not (self.sock is None): diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 34ddcc7..50bf6a0 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -65,7 +65,9 @@ if self.vty: self.vty._close_socket() self.vty = None - osmoutil.end_proc(self.proc) + rc = osmoutil.end_proc(self.proc) + if rc is not None and rc != 0: + raise Exception("Process returned %d" % rc)
class TestVTYGenericBSC(TestVTYBase):