diff --git a/easybuild/tools/build_log.py b/easybuild/tools/build_log.py index 044f53faac..712c3ea4e7 100644 --- a/easybuild/tools/build_log.py +++ b/easybuild/tools/build_log.py @@ -139,7 +139,7 @@ def __init__(self, msg, *args, exit_code=EasyBuildExit.ERROR, **kwargs): def __str__(self): """Return string representation of this EasyBuildError instance.""" - return repr(self.msg) + return self.msg def raise_easybuilderror(msg, *args): diff --git a/test/framework/hooks.py b/test/framework/hooks.py index b460842e33..ccb9722958 100644 --- a/test/framework/hooks.py +++ b/test/framework/hooks.py @@ -271,7 +271,7 @@ def run_hooks(): "== Running pre-single_extension hook...", "this is run before installing an extension", "== Running fail hook...", - "EasyBuild FAIL: 'oops'", + "EasyBuild FAIL: oops", "== Running crash hook...", "EasyBuild CRASHED, oh no! => boom!", "== Running post-easyblock hook...", diff --git a/test/framework/sandbox/easybuild/easyblocks/t/toy.py b/test/framework/sandbox/easybuild/easyblocks/t/toy.py index da631b2390..9fde1a3783 100644 --- a/test/framework/sandbox/easybuild/easyblocks/t/toy.py +++ b/test/framework/sandbox/easybuild/easyblocks/t/toy.py @@ -135,7 +135,7 @@ def build_step(self, name=None, cfg=None): def test_step(self, *args, **kwargs): """Test toy.""" if self.cfg['runtest'] == 'RAISE_ERROR': - raise EasyBuildError("TOY_TEST_FAIL") + raise EasyBuildError("TOY_TEST_FAIL\nDescription on new line") else: super().test_step(*args, **kwargs) diff --git a/test/framework/toy_build.py b/test/framework/toy_build.py index 9045494bc7..6edf4f3258 100644 --- a/test/framework/toy_build.py +++ b/test/framework/toy_build.py @@ -1778,7 +1778,7 @@ def test_external_dependencies(self): write_file(toy_ec, ectxt + extraectxt) if isinstance(self.modtool, Lmod): - err_msg = r"Module command \\'.*load nosuchbuilddep/0.0.0\\' failed" + err_msg = r"Module command '.*load nosuchbuilddep/0.0.0' failed" else: err_msg = r"Unable to locate a modulefile for 'nosuchbuilddep/0.0.0'" @@ -1791,7 +1791,7 @@ def test_external_dependencies(self): write_file(toy_ec, ectxt + extraectxt) if isinstance(self.modtool, Lmod): - err_msg = r"Module command \\'.*load nosuchmodule/1.2.3\\' failed" + err_msg = r"Module command '.*load nosuchmodule/1.2.3' failed" else: err_msg = r"Unable to locate a modulefile for 'nosuchmodule/1.2.3'" @@ -4842,7 +4842,7 @@ def test_toy_failing_test_step(self): test_ec_txt += '\nruntest = "RAISE_ERROR"' write_file(test_ec, test_ec_txt) - error_pattern = r"An error was raised during test step: 'TOY_TEST_FAIL'" + error_pattern = "An error was raised during test step: TOY_TEST_FAIL\nDescription" self.assertErrorRegex(EasyBuildError, error_pattern, self.run_test_toy_build_with_output, ec_file=test_ec, raise_error=True)