Skip to content

Commit 526463d

Browse files
authored
Merge pull request #1144 from xylar/fix-test-suite
Fix test suite for e3sm-unified
2 parents 9179071 + 1b85de7 commit 526463d

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

suite/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def main():
3636
account, partition, configuration, qos = \
3737
machine_info.get_account_defaults()
3838

39-
use_e3sm_unified = 'E3SMU_SCRIPT' in os.environ
39+
use_e3sm_unified = 'E3SM_UNIFIED_LOAD_SCRIPT' in os.environ
4040
if use_e3sm_unified:
41-
e3sm_unified_script = os.environ['E3SMU_SCRIPT']
41+
e3sm_unified_script = os.environ['E3SM_UNIFIED_LOAD_SCRIPT']
4242
args.branch = \
4343
os.path.splitext(os.path.basename(e3sm_unified_script))[0]
4444
else:

suite/templates/job_script.bash

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,33 @@
88

99
set -e
1010

11-
{% if use_e3sm_unified %}
11+
{% if use_e3sm_unified -%}
1212
source {{ e3sm_unified_script }}
1313

1414
echo E3SM-Unified: {{ e3sm_unified_script }}
15-
{% elif pixi_env %}
15+
{% elif pixi_env -%}
1616
export HDF5_USE_FILE_LOCKING=FALSE
1717
export E3SMU_MACHINE={{ machine }}
1818

19-
run_mpas_analysis() {
20-
pixi run --manifest-path ../../pixi.toml -e {{ pixi_env }} mpas_analysis "$@"
21-
}
19+
eval "$(pixi shell-hook --manifest-path ../../pixi.toml -e {{ pixi_env }})"
2220

2321
echo pixi env: {{ pixi_env }}
24-
{% else %}
22+
{% else -%}
2523
source {{ conda_base }}/etc/profile.d/conda.sh
2624
conda activate {{ conda_env }}
2725
export HDF5_USE_FILE_LOCKING=FALSE
2826
export E3SMU_MACHINE={{ machine }}
2927

30-
run_mpas_analysis() {
31-
mpas_analysis "$@"
32-
}
3328

3429
echo env: {{ conda_env }}
35-
{% endif %}
30+
{% endif -%}
3631
echo configs: {{ flags }} {{ config }}
3732

38-
run_mpas_analysis --list
39-
run_mpas_analysis --plot_colormaps
40-
run_mpas_analysis --setup_only {{ flags }} {{ config }}
41-
run_mpas_analysis --purge {{ flags }} {{ config }} --verbose
42-
run_mpas_analysis --html_only {{ flags }} {{ config }}
33+
mpas_analysis --list
34+
mpas_analysis --plot_colormaps
35+
mpas_analysis --setup_only {{ flags }} {{ config }}
36+
mpas_analysis --purge {{ flags }} {{ config }} --verbose
37+
mpas_analysis --html_only {{ flags }} {{ config }}
4338

4439
chmod ugo+rx {{ html_base }}/{{ out_common_dir }}
4540
chmod -R ugo+rX {{ html_base }}/{{ out_subdir }}

0 commit comments

Comments
 (0)