Closed SeanBryan51 closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 72.38%. Comparing base (
59910ed
) to head (6d3436a
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Some problems that I've encountered:
#!/bin/bash
do not find the wrapper function but scripts that use #!/bin/sh
do.environment_modules_wrapper.bash
script to define the wrapper function when executing a custom build script. However custom build scripts may source system wide scripts and overwrite the wrapper function, e.g. the build script for the main branch of CABLE contains . /etc/bashrc
which redefines the original module function.After discussing with @ccarouge, we have decided to add support for spack and to deprecate support for legacy CABLE build systems in benchcab. This adds the requirement that users will only be able to test benchcab on branches that can be built by spack. ACCESS-NRI will help with transitioning legacy build systems to use the latest build system compatible with spack.
Moving to spack will solve existing issues around supporting bespoke build scripts (e.g. #244, #249). This is the best way forward considering support for legacy build systems is a temporary that will be deprecated sooner or later.
Closing this PR.
This change disables module commands that modify the environment via a wrapper when running a custom build script. This avoids preprocessing the custom build script for module statements which may produce an invalid bash script. This also allows for module commands that do not alter the environment to be executed as we only disable a subset of subcommands in the wrapper.
Fixes #249