zdtm: handle errors of make

Submitted by Andrey Vagin on July 2, 2018, 11:52 p.m.

Details

Message ID 20180702235214.3775-1-avagin@virtuozzo.com
State Accepted
Series "zdtm: handle errors of make"
Commit 8dcac7b3899df117c36f5f04b42322d48bc0bf9a
Headers show

Commit Message

Andrey Vagin July 2, 2018, 11:52 p.m.
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 test/zdtm.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm.py b/test/zdtm.py
index c795490ae..c0a1b4278 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -358,6 +358,9 @@  class test_fail_exc(Exception):
 	def __init__(self, step):
 		self.step = step
 
+	def __str__(self):
+		return str(self.step)
+
 
 class test_fail_expected_exc(Exception):
 	def __init__(self, cr_action):
@@ -397,7 +400,8 @@  class zdtm_test:
 				preexec_fn = self.__freezer and self.__freezer.attach or None)
 		if act == "pid":
 			try_run_hook(self, ["--post-start"])
-		s.wait()
+		if s.wait():
+			raise test_fail_exc(str(s_args))
 
 		if self.__freezer:
 			self.__freezer.freeze()