diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py index e9dffaaca5..e92bc87450 100644 --- a/easybuild/framework/easyblock.py +++ b/easybuild/framework/easyblock.py @@ -2366,7 +2366,7 @@ def perform_step(step, obj, method, logfile): return get_easyblock_instance(obj) else: apploginfo(obj, "Running %s step" % step) - method(obj) + method(obj)() except Exception, err: # catch all possible errors, also crashes in EasyBuild code itself fullerr = str(err) if not isinstance(err, EasyBuildError): @@ -2413,7 +2413,7 @@ def perform_step(step, obj, method, logfile): _log.info("Skipping step %s" % step_name) else: for step_method in step_methods: - method_name = '_'.join(step_method.func_code.co_names) + method_name = step_method(app).__name__ perform_step('_'.join([step_name, method_name]), app, step_method, applog) # close log and move it diff --git a/test/framework/toy_build.py b/test/framework/toy_build.py index 2aa8469112..2b3f116bf4 100644 --- a/test/framework/toy_build.py +++ b/test/framework/toy_build.py @@ -1029,6 +1029,17 @@ def test_package_skip(self): toypkg = os.path.join(pkgpath, 'toy-0.0-eb-%s.1.rpm' % EASYBUILD_VERSION) self.assertTrue(os.path.exists(toypkg), "%s is there" % toypkg) + def test_regtest(self): + """Test use of --regtest.""" + self.test_toy_build(extra_args=['--regtest', '--sequential'], verify=False) + + # just check whether module exists + toy_module = os.path.join(self.test_installpath, 'modules', 'all', 'toy', '0.0') + msg = "module %s found" % toy_module + if get_module_syntax() == 'Lua': + toy_module += '.lua' + self.assertTrue(os.path.exists(toy_module), msg) + def suite(): """ return all the tests in this file """