diff --git a/.install-libght.sh b/.install-libght.sh new file mode 100644 index 0000000..1b23989 --- /dev/null +++ b/.install-libght.sh @@ -0,0 +1,4 @@ +#!/bin/sh +set -ex +git clone https://github.com/pramsey/libght.git +cd libght; cmake .; make; sudo make install; sudo ldconfig diff --git a/.travis.yml b/.travis.yml index 9a0c0ca..7ff6d9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,20 +10,19 @@ install: - sudo apt-get install -qq g++-4.8 - export CXX="g++-4.8" - sh .install-lazperf.sh + - sh .install-libght.sh + - npm install -g eclint@1.1.5 addons: postgresql: "9.3" # for "installcheck" -before_script: - - npm install -g eclint@1.1.5 - - eclint check * */* */cunit/* - - ./autogen.sh +# Note: Valgrind currently reports many problems when libght is enabled. So for +# now, and until the problems are fixed, we just run the unit tests with libght +# enabled. script: - - ./configure CFLAGS="-Wall -Werror -O2 -g" --with-lazperf=/usr/local/ - - make - - make check - - valgrind --leak-check=full --error-exitcode=1 lib/cunit/cu_tester - - sudo make install + - eclint check * */* */cunit/* + - ./tools/build-install.sh --with-lazperf=/usr/local --with-libght=/usr/local && make check + - ./tools/build-install.sh --with-lazperf=/usr/local --without-libght && ./tools/valgrind.sh - make installcheck || { cat pgsql/regression.diffs && false; } - - cd tools/benchmark_compression && sh compression_benchmark.sh + - (cd tools/benchmark_compression && sh compression_benchmark.sh) diff --git a/tools/build-install.sh b/tools/build-install.sh new file mode 100755 index 0000000..485b44b --- /dev/null +++ b/tools/build-install.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +if [[ -f config.mk ]]; then + make clean maintainer-clean +fi + +./autogen.sh +./configure CFLAGS="-Wall -Werror -O2 -g" $@ +make +sudo make install diff --git a/tools/valgrind.sh b/tools/valgrind.sh new file mode 100755 index 0000000..acfc270 --- /dev/null +++ b/tools/valgrind.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e + +valgrind --leak-check=full --error-exitcode=1 lib/cunit/cu_tester