Skip to content

Commit 05835b8

Browse files
try again to make linter happy
1 parent bae897a commit 05835b8

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tests/rt_utils.sh

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ ECFLOW_RUNNING=false
1414

1515
jobid=0
1616

17+
redirect_out_err() {
18+
( "$@" 2>&1 1>&3 3>&- | tee err ) 3>&1 1>&2 | tee out
19+
# The above shell redirection copies stdout to "out" and stderr to "err"
20+
# while still sending them to stdout and stderr. It does this without
21+
# relying on bash-specific extensions or non-standard OS features.
22+
}
23+
1724
function compute_petbounds_and_tasks() {
1825

1926
# each test MUST define ${COMPONENT}_tasks variable for all components it is using

tests/run_test.sh

+2-8
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ remove_fail_test() {
2525
rm -f "${PATHRT}/fail_test_${TEST_ID}"
2626
}
2727

28-
redirect_out_err() {
29-
( "$@" 2>&1 1>&3 3>&- | tee err ) 3>&1 1>&2 | tee out
30-
# The above shell redirection copies stdout to "out" and stderr to "err"
31-
# while still sending them to stdout and stderr. It does this without
32-
# relying on bash-specific extensions or non-standard OS features.
33-
}
34-
3528
if [[ $# != 5 ]]; then
3629
echo "Usage: $0 PATHRT RUNDIR_ROOT TEST_NAME TEST_ID COMPILE_ID"
3730
exit 1
@@ -387,7 +380,8 @@ if [[ ${SCHEDULER} = 'none' ]]; then
387380

388381
ulimit -s unlimited
389382
if [[ ${CI_TEST} = 'true' ]]; then
390-
redirect_out_err $( eval "${OMP_ENV}" mpiexec -n "${TASKS}" ./fv3.exe )
383+
( eval "${OMP_ENV}" ;
384+
redirect_out_err mpiexec -n "${TASKS}" ./fv3.exe )
391385
else
392386
redirect_out_err mpiexec -n "${TASKS}" ./fv3.exe
393387
fi

0 commit comments

Comments
 (0)