From 733ab952cd2b083710c2159344665d72ffa56f3c Mon Sep 17 00:00:00 2001 From: zaikunzhang Date: Sun, 11 Aug 2024 15:59:16 -0700 Subject: [PATCH] 240811.155916.PDT revise flint and mlint --- fortran/tests/tools/flint | 29 +++++++++++++---------------- fortran/tests/tools/mlint | 25 +++++++++++++------------ 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/fortran/tests/tools/flint b/fortran/tests/tools/flint index b4d0335f8c..345027faef 100755 --- a/fortran/tests/tools/flint +++ b/fortran/tests/tools/flint @@ -11,25 +11,25 @@ fi TEST_ALL="N" CLEAN="N" -# sunf95 is case sensitive. Put it as the first. -# Disable atest for now, since it encounters licensing errors randomly -printf "\n****** ATEST is disabled ******\n" +# Decide the list of tests to make. # N.B.: () defines an array -COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx) -CLIST=(s g n 9 i v f d x) +# sunf95 is case sensitive. Put it as the first. +COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx) +CLIST=(s g n 9 i v x) COMP_LIST="" for i in "${!COMPILER_LIST[@]}"; do if type "${COMPILER_LIST[$i]}" &> /dev/null ; then - if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then - # Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead. - if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then - COMP_LIST="$COMP_LIST ${CLIST[$i]}" - fi - else - COMP_LIST="$COMP_LIST ${CLIST[$i]}" - fi + COMP_LIST="$COMP_LIST ${CLIST[$i]}" fi done +# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead. +if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then + COMP_LIST="$COMP_LIST f" +fi +# Make dtest if AOCC flang is installed. +if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then + COMP_LIST="$COMP_LIST d" +fi # Parse the arguments while [[ -n "$1" ]]; do @@ -49,9 +49,6 @@ while [[ -n "$1" ]]; do -n|--nagfor) COMP_LIST=" n" ;; - -a|--absoft) - COMP_LIST=" a" - ;; -9|--g95) COMP_LIST=" 9" ;; diff --git a/fortran/tests/tools/mlint b/fortran/tests/tools/mlint index 306bd617c1..15f2dd3bb9 100755 --- a/fortran/tests/tools/mlint +++ b/fortran/tests/tools/mlint @@ -20,24 +20,25 @@ fi TEST_ALL="N" CLEAN="N" -# af95 does not support internal subroutine as an actual argument. So it is not included -# sunf95 is case sensitive. Put it as the first. +# Decide the list of tests to make. # N.B.: () defines an array -COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran flang aflang ifx) -CLIST=(s g n 9 i v f d x) +# sunf95 is case sensitive. Put it as the first. +COMPILER_LIST=(sunf95 gfortran nagfor g95 ifort nvfortran ifx) +CLIST=(s g n 9 i v x) COMP_LIST="" for i in "${!COMPILER_LIST[@]}"; do if type "${COMPILER_LIST[$i]}" &> /dev/null ; then - if [[ "${COMPILER_LIST[$i]}" == "flang" ]] ; then - # Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead. - if ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then - COMP_LIST="$COMP_LIST ${CLIST[$i]}" - fi - else - COMP_LIST="$COMP_LIST ${CLIST[$i]}" - fi + COMP_LIST="$COMP_LIST ${CLIST[$i]}" fi done +# Do not make ftest if flang is provided by ARM or AMD; rtest and dtest should be made instead. +if type flang &> /dev/null && ! type "${COMPILER_LIST[$i]}" | grep -q '\/opt\/arm\|\/opt\/AMD' ; then + COMP_LIST="$COMP_LIST f" +fi +# Make dtest if AOCC flang is installed. +if [[ -n "$(find -L /opt/AMD -type f -executable -name flang -print 2>/dev/null)" ]] ; then + COMP_LIST="$COMP_LIST d" +fi # Parse the arguments while [[ -n "$1" ]]; do