Skip to content

Commit

Permalink
try again to make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTrahanNOAA committed Jun 27, 2024
1 parent bae897a commit 05835b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ ECFLOW_RUNNING=false

jobid=0

redirect_out_err() {
( "$@" 2>&1 1>&3 3>&- | tee err ) 3>&1 1>&2 | tee out
# The above shell redirection copies stdout to "out" and stderr to "err"
# while still sending them to stdout and stderr. It does this without
# relying on bash-specific extensions or non-standard OS features.
}

function compute_petbounds_and_tasks() {

# each test MUST define ${COMPONENT}_tasks variable for all components it is using
Expand Down
10 changes: 2 additions & 8 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ remove_fail_test() {
rm -f "${PATHRT}/fail_test_${TEST_ID}"
}

redirect_out_err() {
( "$@" 2>&1 1>&3 3>&- | tee err ) 3>&1 1>&2 | tee out
# The above shell redirection copies stdout to "out" and stderr to "err"
# while still sending them to stdout and stderr. It does this without
# relying on bash-specific extensions or non-standard OS features.
}

if [[ $# != 5 ]]; then
echo "Usage: $0 PATHRT RUNDIR_ROOT TEST_NAME TEST_ID COMPILE_ID"
exit 1
Expand Down Expand Up @@ -387,7 +380,8 @@ if [[ ${SCHEDULER} = 'none' ]]; then

ulimit -s unlimited
if [[ ${CI_TEST} = 'true' ]]; then
redirect_out_err $( eval "${OMP_ENV}" mpiexec -n "${TASKS}" ./fv3.exe )
( eval "${OMP_ENV}" ;
redirect_out_err mpiexec -n "${TASKS}" ./fv3.exe )
else
redirect_out_err mpiexec -n "${TASKS}" ./fv3.exe
fi
Expand Down

0 comments on commit 05835b8

Please sign in to comment.