Add mac regression test and modify runtest.sh for portability (#796)

The expression '\t' for <tab> does not work on the mac, so the whitespace
expressions were changed to use the posix standard '[[:space:]]'.
This commit is contained in:
Rob Falgout 2022-12-21 08:34:48 -08:00 committed by GitHub
parent b9596c6b55
commit 45b6cdb1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 31 deletions

View File

@ -35,40 +35,18 @@ mkdir -p $output_dir
src_dir=`cd $1; pwd`
shift
# This is needed for some reason
export CXX="mpicxx"
# Basic build and run tests
# Make sure that we don't check for a working Fortran compiler
mo="test"
ro="-ams -ij -sstruct -struct -rt -D HYPRE_NO_SAVED"
mo="-j test"
ro="-ams -ij -sstruct -struct -lobpcg"
co="--disable-fortran"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro
co=""
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic-default
co="--enable-debug --disable-fortran"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
co="--enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh basic $output_dir/basic--enable-debug
co="--enable-bigint --disable-fortran"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic--enable-bigint
co="--enable-mixedint --disable-fortran"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic--enable-mixedint
# Test linking for different languages
link_opts="all++"
for opt in $link_opts
do
output_subdir=$output_dir/link$opt
mkdir -p $output_subdir
./test.sh link.sh $src_dir $opt
mv -f link.??? $output_subdir
done
# Echo to stderr all nonempty error files in $output_dir
for errfile in $( find $output_dir ! -size 0 -name "*.err" )
do

View File

@ -54,7 +54,7 @@ tail -11 ${TNAME}.out.verb.2 | head -3 >> ${TNAME}.out
# Make sure that the output file is reasonable
RUNCOUNT=18
OUTCOUNT=`grep "Eigenvalue" ${TNAME}.out | wc -l`
OUTCOUNT=`grep "Eigenvalue" ${TNAME}.out | wc -l | sed -e 's/^[[:space:]]*//'`
if [ "$OUTCOUNT" != "$RUNCOUNT" ]; then
echo "Incorrect number of runs in ${TNAME}.out" >&2
fi

View File

@ -319,8 +319,8 @@ function ExecuteJobs
;;
*mpirun*)
RunCmd=`echo $InputLine| sed -e 's/^[ \t]*mpirun[ \t]*//'` # remove 'mpirun'
RunCmd=`echo $RunCmd | sed -e 's/[ \t]*>.*$//'` # remove output redirect
RunCmd=`echo $InputLine| sed -e 's/^[[:space:]]*mpirun[[:space:]]*//'` # remove 'mpirun'
RunCmd=`echo $RunCmd | sed -e 's/[[:space:]]*>.*$//'` # remove output redirect
OutFile=`echo $InputLine | sed -e 's/^.*>//'` # set output file
OutFile=`echo $OutFile | sed -e 's/ //g'` # remove extra space
ErrFile=`echo $OutFile | sed -e 's/\.out\./.err./'` # set error file