Skip to content

Commit

Permalink
Merge pull request #3415 from Crivella/feature-MW_runshellcommand
Browse files Browse the repository at this point in the history
Replace `run_cmd` with `run_shell_cmd` in custom easyblock for MetalWalls
  • Loading branch information
boegel authored Aug 19, 2024
2 parents 2fff133 + 70e04b9 commit c8bc3ef
Showing 1 changed file with 5 additions and 6 deletions.
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

0 comments on commit c8bc3ef

Please sign in to comment.