forked from github/server
jsreport: return error if file not open. add scan-build to travis
This commit is contained in:
parent
ef4052b0f6
commit
09db2fe278
3 changed files with 7 additions and 6 deletions
|
@ -2,10 +2,12 @@ language: c
|
|||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
script: s/travis-build
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind
|
||||
install:
|
||||
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind clang
|
||||
script:
|
||||
- s/travis-build
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
|
|
@ -4,9 +4,8 @@ set -e
|
|||
ROOT=`pwd`
|
||||
SUPP=../share/ubuntu-12_04.supp
|
||||
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="$ROOT/build-$MACHINE-$CC-Debug"
|
||||
|
||||
inifile() {
|
||||
|
@ -20,7 +19,7 @@ fi
|
|||
build() {
|
||||
cd $BUILD
|
||||
cmake -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules -DCMAKE_BUILD_TYPE=Debug ..
|
||||
make
|
||||
scan-build make
|
||||
}
|
||||
|
||||
test_valgrind_report () {
|
||||
|
|
|
@ -74,7 +74,7 @@ static int report_json(const char *filename, report_context * ctx, const char *c
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
return errno;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue