Skip to content
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

Replace run_cmd with run_shell_cmd in custom easyblock for MetalWalls #3415

Merged
merged 1 commit into from
Aug 19, 2024
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
11 changes: 5 additions & 6 deletions easybuild/easyblocks/m/metalwalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
from easybuild.tools.run import run_shell_cmd

from easybuild.easyblocks.generic.makecp import MakeCp

Expand Down Expand Up @@ -89,15 +89,14 @@ def configure_step(self):
f90flags += ['-fallow-argument-mismatch'] # Code inside ifdef causes mismatch errors
fppflags += ['-DMW_USE_PLUMED']
cmd = ['touch', 'mw2.diff']
run_cmd(' '.join(cmd), log_all=False, log_ok=False, simple=False, regexp=False)
run_shell_cmd(' '.join(cmd), fail_on_error=False)
cmd = ['plumed', 'patch', '-d mw2.diff', '--patch', '--shared', '--engine', 'mw2']
run_cmd(' '.join(cmd), log_all=True, simple=False)
run_shell_cmd(' '.join(cmd))
else:
self.log.info('PLUMED not found, excluding from test-suite')
rgx = tpl_rgx % 'plumed'
cmd = ['sed', '-i', "'s/^\\( \\+\\)%s$/\\1pass # %s/'" % (rgx, rgx), 'tests/regression_tests.py']
cmd = ['sed', '-i', "'s/%s/pass/'" % rgx, 'tests/regression_tests.py']
run_cmd(' '.join(cmd), log_all=True, simple=False)
run_shell_cmd(' '.join(cmd))

if f90wrap:
if not get_software_root('mpi4py'):
Expand All @@ -115,7 +114,7 @@ def configure_step(self):
self.log.info('f90wrap not found, excluding python interface from test-suite')
rgx = tpl_rgx % 'python_interface'
cmd = ['sed', '-i', "'s/%s/pass/'" % rgx, 'tests/regression_tests.py']
run_cmd(' '.join(cmd), log_all=True, simple=False)
run_shell_cmd(' '.join(cmd))

# Add libraries with LAPACK support
lapack_shared_libs = os.getenv('LAPACK_SHARED_LIBS', None)
Expand Down
Loading