diff --git a/tests/c++-compiler/test.sh b/tests/c++-compiler/test.sh index 400f643..35171a9 100755 --- a/tests/c++-compiler/test.sh +++ b/tests/c++-compiler/test.sh @@ -44,15 +44,22 @@ pwd for compiler in $compilers; do for version in $(module av $compiler -l 2>&1 | awk "/^$compiler/{print \$1}" | awk -F'/' '{print $2}'); do - echo "--------------------------------------------------" - echo "testing $compiler/$version ..." - echo "--------------------------------------------------" - swap_env $compiler - module swap $compiler $compiler/$version - compiler_version_cmd $compiler - compiler_check_stdexcept $compiler - echo "--------------------------------------------------" + logfile="$compiler-$version.log" + echo -en "testing $compiler/$version ... " + error=0 + swap_env $compiler 2>$logfile >$logfile || error=1 + module swap $compiler $compiler/$version 2>>$logfile >>$logfile || error=1 + compiler_version_cmd $compiler 2>>$logfile >>$logfile || error=1 + compiler_check_stdexcept $compiler 2>> $logfile >>$logfile || error=1 + if [ $error != 0 ] ; then + echo "failed :-(" + echo "Error msg:" + echo "--------------------------------------------------" + cat $logfile + echo "--------------------------------------------------" + echo "" + else + echo "success :-)" + fi done - echo "--------------------------------------------------" - echo "" done 2>&1 | tee compiler-test.log