make preview script valgrind use suppression file, closing issue #154

This commit is contained in:
Enno Rehling 2015-06-17 07:50:35 +02:00
parent ff3fdb62cd
commit 32bd8c4353
2 changed files with 11 additions and 3 deletions

View file

@ -6,6 +6,7 @@ done
[ -z $BUILD ] && BUILD=Debug [ -z $BUILD ] && BUILD=Debug
MACHINE=`uname -m` MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" [ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" [ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"

View file

@ -1,5 +1,12 @@
#!/bin/bash #!/bin/bash
MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which clang` ] && CC="clang"
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
BUILD="build-$MACHINE-$CC-Debug"
function usage() { function usage() {
cat <<HEREDOC cat <<HEREDOC
usage: $0 [-t <turn>] [-g <game>] [-f <file>] command [args] usage: $0 [-t <turn>] [-g <game>] [-f <file>] command [args]
@ -80,8 +87,8 @@ ln -f $LIVE/data/$turn.dat data/
rm -rf reports rm -rf reports
mkdir -p reports mkdir -p reports
SUPP="$SERVER/share/ubuntu-12_04.supp" SUPP="$SOURCE/share/ubuntu-12_04.supp"
SERVER="$SOURCE/build-x86_64-gcc-Debug/eressea/eressea" SERVER="$SOURCE/$BUILD/eressea/eressea"
VALGRIND=$(which valgrind) VALGRIND=$(which valgrind)
if [ ! -z $VALGRIND ]; then if [ ! -z $VALGRIND ]; then
SERVER="$VALGRIND --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER" SERVER="$VALGRIND --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER"
@ -148,7 +155,7 @@ case "$1" in
;; ;;
"run") "run")
if [ $turn -eq 0 ]; then if [ $turn -eq 0 ]; then
[ -f $LIVE/turn ] || abort "missing turn file, and no turn specified" [ -f $LIVE/turn ] || abort "missing turn file in $LIVE, and no turn specified"
let turn=$(cat $LIVE/turn)-1 let turn=$(cat $LIVE/turn)-1
fi fi
run run