Skip to content

Commit

Permalink
Use correct module for errors_found_in_log
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Dec 10, 2019
1 parent 2845905 commit e5950d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
from easybuild.framework.easyconfig.style import MAX_LINE_LENGTH
from easybuild.framework.easyconfig.tools import get_paths_for
from easybuild.framework.easyconfig.templates import TEMPLATE_NAMES_EASYBLOCK_RUN_STEP, template_constant_dict
from easybuild.tools import config, filetools
from easybuild.tools import config, run
from easybuild.tools.build_details import get_build_stats
from easybuild.tools.build_log import EasyBuildError, dry_run_msg, dry_run_warning, dry_run_set_dirs
from easybuild.tools.build_log import print_error, print_msg, print_warning
Expand Down Expand Up @@ -3044,7 +3044,7 @@ def build_and_install_one(ecdict, init_env):

# restore original environment, and then sanitize it
_log.info("Resetting environment")
filetools.errors_found_in_log = 0
run.errors_found_in_log = 0
restore_env(init_env)
sanitize_env()

Expand Down Expand Up @@ -3195,9 +3195,9 @@ def build_and_install_one(ecdict, init_env):
print_msg("%s: Installation %s %s (took %s)" % (summary, ended, succ, req_time), log=_log, silent=silent)

# check for errors
if filetools.errors_found_in_log > 0:
if run.errors_found_in_log > 0:
print_msg("WARNING: %d possible error(s) were detected in the "
"build logs, please verify the build." % filetools.errors_found_in_log,
"build logs, please verify the build." % run.errors_found_in_log,
_log, silent=silent)

if app.postmsg:
Expand Down
6 changes: 3 additions & 3 deletions test/framework/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def setUp(self):
self.env_path = os.environ.get('PATH')
self.env_pythonpath = os.environ.get('PYTHONPATH')

self.modtool = modules_tool()
self.reset_modulepath([os.path.join(testdir, 'modules')])
reset_module_caches()
#self.modtool = modules_tool()
#self.reset_modulepath([os.path.join(testdir, 'modules')])
#reset_module_caches()

def allow_deprecated_behaviour(self):
"""Restore EasyBuild version to what it was originally, to allow triggering deprecated behaviour."""
Expand Down

0 comments on commit e5950d8

Please sign in to comment.