summaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2015-01-09 19:13:29 -0800
committerJosh Haberman <jhaberman@gmail.com>2015-01-09 19:13:29 -0800
commitbebdc009b484295f06185b5bab884a3754bbbacd (patch)
tree36206ec73f7cf8cb0ac113dd476fd03f3dda8892 /travis.sh
parentb55f32b278deddaf2c75d7d24b5722017850d6d1 (diff)
Coverage support for coveralls.io.
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/travis.sh b/travis.sh
index b4c1afa..1cb6a04 100755
--- a/travis.sh
+++ b/travis.sh
@@ -49,7 +49,26 @@ lua_script() {
make -j12 testlua USER_CPPFLAGS=`pkg-config lua5.2 --cflags`
}
+# A run that executes with coverage support and uploads to coveralls.io
+coverage_install() {
+ sudo apt-get update -qq
+ sudo apt-get install protobuf-compiler libprotobuf-dev lua5.2 liblua5.2-dev
+ sudo pip install cpp-coveralls
+}
+coverage_script() {
+ make -j12 tests googlepbtests testlua WITH_JIT=yes \
+ USER_CPPFLAGS="--coverage `pkg-config lua5.2 --cflags`"
+ make test
+}
+coverage_after_success() {
+ coveralls --exclude dynasm --exclude tests --exclude upb/bindings/linux --gcov-options '\-lp'
+}
+
+if [ "$1" == "after_success" ] && [ "$UPB_TRAVIS_BUILD" != "coverage" ]; then
+ # after_success is only used for coverage.
+ exit
+fi
+
set -e
set -x
eval ${UPB_TRAVIS_BUILD}_${1}
-
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback