Skip to content

Commit

Permalink
Fix rt.sh -n option to work with new rt.conf MACHINES format
Browse files Browse the repository at this point in the history
  • Loading branch information
MinsukJi-NOAA committed Jan 26, 2021
1 parent 06bc77b commit 6b6d74f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ rt_single() {
[[ ${#line} == 0 ]] && continue
[[ $line == \#* ]] && continue

if [[ $line =~ COMPILE && $line =~ ${MACHINE_ID} ]]; then
compile_line=$line
if [[ $line == COMPILE* ]] ; then
MACHINES=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//')
if [[ ${MACHINES} == '' ]]; then
compile_line=$line
elif [[ ${MACHINES} == -* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=$line
elif [[ ${MACHINES} == +* ]]; then
[[ ${MACHINES} =~ ${MACHINE_ID} ]] && compile_line=$line
fi
fi

if [[ $line =~ RUN ]]; then
Expand Down Expand Up @@ -771,6 +778,7 @@ else
[[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT}
[[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db
[[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20*
[[ ${SINGLE_NAME} != '' ]] && rm -f rt.conf.single
fi

date >> ${REGRESSIONTEST_LOG}
Expand Down

0 comments on commit 6b6d74f

Please sign in to comment.