-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed: move helper scripts to a scripts folder in root
git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1564 e10b68d5-8a6e-419e-a041-bce267b0401d
- Loading branch information
Showing
5 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Convenience script that compiles and runs all regression tests | ||
|
||
ROOT=`readlink -f $0` | ||
ROOT=`dirname $ROOT`/.. | ||
PATHS=". Apps/Stokes Apps/FiniteDefElasticity" | ||
|
||
rm -f $ROOT/failed.log | ||
|
||
globres=0 | ||
for p in $PATHS | ||
do | ||
cd $ROOT/$p | ||
mkdir Release-Testing | ||
cd Release-Testing | ||
cmake $ROOT/$p -DDISABLE_HDF5=1 -DCMAKE_BUILD_TYPE=Release -DIFEM_BUILD_TYPE=Release-Testing | ||
make -j3 | ||
if ! make test | ||
then | ||
globres=1 | ||
fi | ||
done | ||
|
||
if test $globres -eq 1 | ||
then | ||
echo "Some tests failed, see failed.log in root of repository for details" | ||
fi | ||
|
||
for p in $PATHS | ||
do | ||
rm $ROOT/$p/Release-Testing -rf | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# This script performs a single regression. | ||
# It is used by the 'make test' target in the buildsystems | ||
# Usually you should use 'make test' rather than calling this script directly | ||
# | ||
# Parameters: $1 = Application binary | ||
# $2 = Regression test file | ||
# | ||
# A regression test file is of the format: | ||
# parameters to application | ||
# blank line | ||
# output from program to compare to | ||
|
||
mysim=$1 | ||
|
||
cd `dirname $2` | ||
readarray < $2 | ||
$mysim $MAPFILE 2>&1 > templog | ||
globres=1 | ||
IFS=$'\n' | ||
for line in `cat $2` | ||
do | ||
test -z "$line" && continue | ||
echo "$line" | grep -q ".inp" && continue | ||
result=0 | ||
if grep -q "$line" templog | ||
then result=1 | ||
fi | ||
if test $result -eq 0 | ||
then | ||
if test $globres -eq 1 | ||
then | ||
echo "-------- $2 --------" >> ../../../failed.log | ||
fi | ||
globres=0 | ||
echo Failed to find output: $line >> ../../../failed.log | ||
fi | ||
done | ||
|
||
if test $globres -eq 0 | ||
then | ||
cat templog >> ../../../failed.log | ||
rm templog | ||
exit 1 | ||
fi | ||
|
||
rm templog | ||
exit 0 |
File renamed without changes.