From fe728f899d462cf01b1a0ab8c418abc9af66853a Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 13 Feb 2018 16:31:38 -0500 Subject: [PATCH] tests: virtconvtest: Accumulate more errors before exiting --- tests/virtconvtest.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/virtconvtest.py b/tests/virtconvtest.py index b5793c91e..dbb35612c 100644 --- a/tests/virtconvtest.py +++ b/tests/virtconvtest.py @@ -78,8 +78,16 @@ class TestVirtConv(unittest.TestCase): if not os.path.exists(in_dir): raise RuntimeError("Directory does not exist: %s" % in_dir) + err = "" for in_path in glob.glob(os.path.join(in_dir, "*")): - self._compare_single_file(in_path, in_type) + try: + self._compare_single_file(in_path, in_type) + except Exception: + import traceback + err += traceback.format_exc() + + if err: + raise AssertionError("Errors encountered:\n%s" % err) def testOVF2Libvirt(self): self._compare_files("ovf")