From 068581b3522d0bec74e01d92d83052c11261e85c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 1 Dec 2020 09:23:02 +0100 Subject: [PATCH 1/2] tweak test_easystack_basic to get better error reporting if it fails --- test/framework/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/options.py b/test/framework/options.py index b4f6e4d90a..3b4c53bab7 100644 --- a/test/framework/options.py +++ b/test/framework/options.py @@ -5633,7 +5633,7 @@ def test_easystack_basic(self): ] for pattern in patterns: regex = re.compile(pattern) - self.assertTrue(regex.match(stdout) is not None) + self.assertTrue(regex.match(stdout), "Pattern '%s' should be found in: %s" % (regex.pattern, stdout)) def test_easystack_wrong_structure(self): """Test for --easystack when yaml easystack has wrong structure""" From 54c8ee73bb834dc8b4960944969f6ac1ea2f5f49 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 1 Dec 2020 10:15:45 +0100 Subject: [PATCH 2/2] enable raising of errors in test_easystack_basic --- test/framework/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/options.py b/test/framework/options.py index 3b4c53bab7..3d69766fc6 100644 --- a/test/framework/options.py +++ b/test/framework/options.py @@ -5621,7 +5621,7 @@ def test_easystack_basic(self): toy_easystack = os.path.join(topdir, 'easystacks', 'test_easystack_basic.yaml') args = ['--easystack', toy_easystack, '--stop', '--debug', '--experimental'] - stdout, err = self.eb_main(args, do_build=True, return_error=True) + stdout = self.eb_main(args, do_build=True, raise_error=True) patterns = [ r"[\S\s]*INFO Building from easystack:[\S\s]*", r"[\S\s]*DEBUG EasyStack parsed\. Proceeding to install these Easyconfigs:.*?[\n]"