Skip to content

replace full trace message for extension check command with simple pass/fail message #4892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions easybuild/framework/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from easybuild.tools.build_log import EasyBuildError, EasyBuildExit, raise_nosupport
from easybuild.tools.filetools import change_dir
from easybuild.tools.run import run_shell_cmd
from easybuild.tools.utilities import trace_msg


def resolve_exts_filter_template(exts_filter, ext):
Expand Down Expand Up @@ -314,9 +315,13 @@ def sanity_check_step(self):
self.log.info("modulename set to False for '%s' extension, so skipping sanity check", self.name)
elif exts_filter:
cmd, stdin = resolve_exts_filter_template(exts_filter, self)
cmd_res = run_shell_cmd(cmd, fail_on_error=False, stdin=stdin)
cmd_res = run_shell_cmd(cmd, fail_on_error=False, stdin=stdin, hidden=True)

if cmd_res.exit_code != EasyBuildExit.SUCCESS:
msg = f"Extension sanity check command '{cmd}': "
if cmd_res.exit_code == EasyBuildExit.SUCCESS:
trace_msg(msg + 'OK')
else:
trace_msg(msg + 'FAIL')
if stdin:
fail_msg = 'command "%s" (stdin: "%s") failed' % (cmd, stdin)
else:
Expand Down