From e087947c84ee6b7d86abe9585ee51efee7595a26 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Sat, 16 May 2015 13:46:48 -0700 Subject: Enabled asserts() and verbosity for most Travis builds. Also added a separate ndebug build for testing that -DNDEBUG builds still work. Also disabled reference debugging by default, since it requires either a global lock or -DUPB_THREAD_UNSAFE. --- travis.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'travis.sh') diff --git a/travis.sh b/travis.sh index a09ed2e..c1028f7 100755 --- a/travis.sh +++ b/travis.sh @@ -74,6 +74,18 @@ genfiles_script() { git diff --exit-code } +# Tests the ndebug build. +ndebug_install() { + sudo apt-get update -qq + sudo apt-get install lua5.2 liblua5.2-dev protobuf-compiler libprotobuf-dev +} +ndebug_script() { + # Override of USER_CPPFLAGS removes -UNDEBUG. + export USER_CPPFLAGS="`pkg-config lua5.2 --cflags` -g -fomit-frame-pointer" + make -j12 tests googlepbtests testlua WITH_JIT=yes + make test +} + # A run that executes with coverage support and uploads to coveralls.io coverage_install() { sudo apt-get update -qq @@ -81,8 +93,8 @@ coverage_install() { sudo pip install cpp-coveralls } coverage_script() { - make -j12 tests googlepbtests testlua WITH_JIT=yes \ - USER_CPPFLAGS="--coverage -O0 `pkg-config lua5.2 --cflags`" + export USER_CPPFLAGS="--coverage -O0 `pkg-config lua5.2 --cflags`" + make -j12 tests googlepbtests testlua WITH_JIT=yes make test } coverage_after_success() { @@ -99,6 +111,12 @@ if [ "$CC" != "gcc" ] && [ "$UPB_TRAVIS_BUILD" == "coverage" ]; then exit fi +# Enable asserts and ref debugging (though some configurations override this). +export USER_CPPFLAGS="-UNDEBUG -DUPB_DEBUG_REFS -DUPB_THREAD_UNSAFE -g" + +# Enable verbose build. +export Q= + set -e set -x -- cgit v1.2.3