Minor update to the C++ compiler test script.

* Generate log file for each compiler
* Report success or fail + error log
This commit is contained in:
Christoph Niethammer 2011-12-03 00:00:40 +00:00
parent 15596f5797
commit 11f2867c3e

View file

@ -44,15 +44,22 @@ pwd
for compiler in $compilers; do for compiler in $compilers; do
for version in $(module av $compiler -l 2>&1 | awk "/^$compiler/{print \$1}" | awk -F'/' '{print $2}'); do for version in $(module av $compiler -l 2>&1 | awk "/^$compiler/{print \$1}" | awk -F'/' '{print $2}'); do
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 "--------------------------------------------------" echo "--------------------------------------------------"
echo "testing $compiler/$version ..." cat $logfile
echo "--------------------------------------------------"
swap_env $compiler
module swap $compiler $compiler/$version
compiler_version_cmd $compiler
compiler_check_stdexcept $compiler
echo "--------------------------------------------------"
done
echo "--------------------------------------------------" echo "--------------------------------------------------"
echo "" echo ""
else
echo "success :-)"
fi
done
done 2>&1 | tee compiler-test.log done 2>&1 | tee compiler-test.log