From 11f2867c3e380247171569556a0c14979a8a7d1e Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Sat, 3 Dec 2011 00:00:40 +0000 Subject: [PATCH] Minor update to the C++ compiler test script. * Generate log file for each compiler * Report success or fail + error log --- tests/c++-compiler/test.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) 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