summaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2015-05-16 13:46:48 -0700
committerJosh Haberman <jhaberman@gmail.com>2015-05-16 14:18:22 -0700
commite087947c84ee6b7d86abe9585ee51efee7595a26 (patch)
treea7ca60b66be0f428645b15f71a7b1c4e190ddcf1 /travis.sh
parent93791bfe65d210385ab1fb1eb1ccd77fca18b2bf (diff)
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.
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh22
1 files changed, 20 insertions, 2 deletions
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback