From 39e35020077eafd63b802fb835956a20e9bf6d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20H=C3=A9nin?= Date: Thu, 7 Sep 2023 10:56:10 +0200 Subject: [PATCH] Do not warn of differences in output log --- gromacs/tests/interface/run_tests.sh | 6 ++---- gromacs/tests/library/run_tests.sh | 6 ++---- lammps/tests/library/run_tests.sh | 7 +++---- namd/tests/library/run_tests.sh | 6 ++---- vmd/tests/interface/run_tests.sh | 6 ++---- 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/gromacs/tests/interface/run_tests.sh b/gromacs/tests/interface/run_tests.sh index b579038dc..1cdfc2e2e 100755 --- a/gromacs/tests/interface/run_tests.sh +++ b/gromacs/tests/interface/run_tests.sh @@ -291,10 +291,8 @@ for dir in ${DIRLIST} ; do fi if [ $RETVAL -ne 0 ] then - if [ ${base} != ${base%.out} ] + if [ ${base} == ${base%.out} ] # Ignore differences in stdout log then - echo -n "(warning: differences in log file $base) " - else echo -e "\n*** Failure for file $(${TPUT_RED})$base$(${TPUT_CLEAR}): see `pwd`/$base.diff " SUCCESS=0 ALL_SUCCESS=0 @@ -321,7 +319,7 @@ for dir in ${DIRLIST} ; do if [ "x${gen_ref_output}" == 'xyes' ]; then echo "Reference files copied successfully." else - echo "$(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" + echo " $(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" fi cleanup_files fi diff --git a/gromacs/tests/library/run_tests.sh b/gromacs/tests/library/run_tests.sh index 078bef5b3..103a09c8c 100755 --- a/gromacs/tests/library/run_tests.sh +++ b/gromacs/tests/library/run_tests.sh @@ -245,10 +245,8 @@ for dir in ${DIRLIST} ; do fi if [ $RETVAL -ne 0 ] then - if [ ${base} != ${base%.out} ] + if [ ${base} == ${base%.out} ] # Ignore differences in stdout log then - echo -n "(warning: differences in log file $base) " - else echo -e "\n*** Failure for file $(${TPUT_RED})$base$(${TPUT_CLEAR}): see `pwd`/$base.diff " SUCCESS=0 ALL_SUCCESS=0 @@ -275,7 +273,7 @@ for dir in ${DIRLIST} ; do if [ "x${gen_ref_output}" == 'xyes' ]; then echo "Reference files copied successfully." else - echo "$(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" + echo " $(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" fi cleanup_files fi diff --git a/lammps/tests/library/run_tests.sh b/lammps/tests/library/run_tests.sh index 514bf18c7..25b9e0895 100755 --- a/lammps/tests/library/run_tests.sh +++ b/lammps/tests/library/run_tests.sh @@ -172,6 +172,7 @@ for dir in ${DIRLIST} ; do "${extra_args[@]}" \ -echo log > /dev/null + # Output of Colvars module, minus the version numbers for log_file in *.out ; do if [ x${log_file%.colvars.out} != x${log_file} ] ; then @@ -236,10 +237,8 @@ for dir in ${DIRLIST} ; do RETVAL=$? if [ $RETVAL -ne 0 ] then - if [ ${base##*\.} = 'out' ] + if [ ${base} == ${base%.out} ] # Ignore differences in stdout log then - echo -n "(warning: differences in log file $base) " - else echo -e "\n*** Failure for file $(${TPUT_RED})$base$(${TPUT_CLEAR}): see `pwd`/$base.diff " SUCCESS=0 ALL_SUCCESS=0 @@ -268,7 +267,7 @@ for dir in ${DIRLIST} ; do if [ "x${gen_ref_output}" == 'xyes' ]; then echo "Reference files copied successfully." else - echo "$(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" + echo " $(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" fi cleanup_files fi diff --git a/namd/tests/library/run_tests.sh b/namd/tests/library/run_tests.sh index b67af39e2..fe4362409 100755 --- a/namd/tests/library/run_tests.sh +++ b/namd/tests/library/run_tests.sh @@ -244,10 +244,8 @@ for dir in ${DIRLIST} ; do fi if [ $RETVAL -ne 0 ] then - if [ ${base} != ${base%.out} ] + if [ ${base} == ${base%.out} ] # Ignore differences in stdout log then - echo -n "(warning: differences in log file $base) " - else echo -e "\n*** Failure for file $(${TPUT_RED})$base$(${TPUT_CLEAR}): see `pwd`/$base.diff " SUCCESS=0 ALL_SUCCESS=0 @@ -276,7 +274,7 @@ for dir in ${DIRLIST} ; do if [ "x${gen_ref_output}" == 'xyes' ]; then echo "Reference files copied successfully." else - echo "$(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" + echo " $(${TPUT_GREEN})Success!$(${TPUT_CLEAR})" fi cleanup_files fi diff --git a/vmd/tests/interface/run_tests.sh b/vmd/tests/interface/run_tests.sh index 7681db075..ef8566ef5 100755 --- a/vmd/tests/interface/run_tests.sh +++ b/vmd/tests/interface/run_tests.sh @@ -78,10 +78,8 @@ do RETVAL=$? if [ $RETVAL -ne 0 ] then - if [ ${base##*\.} = 'out' ] + if [ ${base} == ${base%.out} ] # Ignore differences in stdout log then - echo -n "(warning: differences in log file $base) " - else echo -e "\n*** Failure for file $base: see $dir/$base.diff ***" SUCCESS=0 ALL_SUCCESS=0 @@ -91,7 +89,7 @@ do if [ $SUCCESS -eq 1 ] then - echo "Success!" + echo " Success!" cleanup_files fi