Skip to content

Commit

Permalink
Merge pull request #179 from CABLE-LSM/174-excessive-output-in-job-sc…
Browse files Browse the repository at this point in the history
…ript-from-set-ex

Update usage of `set -ex`
  • Loading branch information
SeanBryan51 authored Oct 25, 2023
2 parents 92181f8 + d1192c9 commit 42e66b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions benchcab/utils/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def render_job_script(
#PBS -m e
#PBS -l storage={'+'.join(storage_flags)}
set -ex
module purge
{module_load_lines}
set -ev
{benchcab_path} fluxsite-run-tasks --config={config_path} {verbose_flag}
{'' if skip_bitwise_cmp else f'''
{benchcab_path} fluxsite-bitwise-cmp --config={config_path} {verbose_flag}
Expand Down
20 changes: 10 additions & 10 deletions tests/test_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def test_default_job_script(self):
#PBS -m e
#PBS -l storage=gdata/ks32+gdata/hh5
set -ex
module purge
module load foo
module load bar
module load baz
set -ev
/absolute/path/to/benchcab fluxsite-run-tasks --config=/path/to/config.yaml
/absolute/path/to/benchcab fluxsite-bitwise-cmp --config=/path/to/config.yaml
Expand Down Expand Up @@ -60,13 +60,13 @@ def test_verbose_flag_added_to_command_line_arguments(self):
#PBS -m e
#PBS -l storage=gdata/ks32+gdata/hh5
set -ex
module purge
module load foo
module load bar
module load baz
set -ev
/absolute/path/to/benchcab fluxsite-run-tasks --config=/path/to/config.yaml -v
/absolute/path/to/benchcab fluxsite-bitwise-cmp --config=/path/to/config.yaml -v
Expand Down Expand Up @@ -94,13 +94,13 @@ def test_skip_bitwise_comparison_step(self):
#PBS -m e
#PBS -l storage=gdata/ks32+gdata/hh5
set -ex
module purge
module load foo
module load bar
module load baz
set -ev
/absolute/path/to/benchcab fluxsite-run-tasks --config=/path/to/config.yaml
"""
Expand Down Expand Up @@ -132,13 +132,13 @@ def test_pbs_config_parameters(self):
#PBS -m e
#PBS -l storage=gdata/ks32+gdata/hh5+gdata/foo
set -ex
module purge
module load foo
module load bar
module load baz
set -ev
/absolute/path/to/benchcab fluxsite-run-tasks --config=/path/to/config.yaml
"""
Expand All @@ -165,13 +165,13 @@ def test_default_pbs_config(self):
#PBS -m e
#PBS -l storage=gdata/ks32+gdata/hh5
set -ex
module purge
module load foo
module load bar
module load baz
set -ev
/absolute/path/to/benchcab fluxsite-run-tasks --config=/path/to/config.yaml
"""
Expand Down

0 comments on commit 42e66b6

Please sign in to comment.