summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.travis.yml12
-rwxr-xr-x.travis_after_success.sh11
-rwxr-xr-x.travis_script.sh9
-rw-r--r--Makefile.am2
5 files changed, 23 insertions, 15 deletions
diff --git a/.gitignore b/.gitignore
index 83ecebd..a1cedca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -97,3 +97,7 @@ vgcore.*
# Patch
*.orig
*.rej
+
+# Coverage
+all_coverage.info
+coverage.info
diff --git a/.travis.yml b/.travis.yml
index bf5fbd1..372a29e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,18 +53,22 @@ matrix:
- COVERITY_SCAN_BRANCH_PATTERN="^v(\d+\.)?(\d+\.)?(\d+)$"
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="./bootstrap && ./configure $CONF"
- COVERITY_SCAN_BUILD_COMMAND="make -j$NPROCS"
- - name: "GCC, Codecov"
+ - name: "GCC, Distcheck"
compiler: gcc
os: linux
env:
- CONF="--enable-obsolete-api --enable-hashes=all"
- - CODECOV=1
- - name: "GCC, Distcheck"
+ - DISTCHECK=1
+ - name: "GCC, Unoptimized build for Codecov"
compiler: gcc
os: linux
env:
- CONF="--enable-obsolete-api --enable-hashes=all"
- - DISTCHECK=1
+ - name: "Clang, Unoptimized build for Codecov"
+ compiler: clang
+ os: linux
+ env:
+ - CONF="--enable-obsolete-api --enable-hashes=all"
- name: "GCC, all hashes, obsolete API, Valgrind"
compiler: gcc
os: linux
diff --git a/.travis_after_success.sh b/.travis_after_success.sh
index c19b7ce..e81d530 100755
--- a/.travis_after_success.sh
+++ b/.travis_after_success.sh
@@ -1,11 +1,12 @@
#!/bin/bash
set -e
-if [[ "$CODECOV" == "1" ]]; then
- lcov --directory . --capture --output-file all_coverage.info
- lcov --remove all_coverage.info '/usr/*' '*test*' > coverage.info
- rm all_coverage.info
- codecov -X gcov
+if [[ "$PERFORM_COVERITY_SCAN" == "1" ]]; then
+ exit 0
fi
+lcov --directory . --capture --output-file all_coverage.info
+lcov --remove all_coverage.info '/usr/*' '*test*' > coverage.info
+rm all_coverage.info
+codecov -X gcov
exit 0
diff --git a/.travis_script.sh b/.travis_script.sh
index 873996d..0ca44e7 100755
--- a/.travis_script.sh
+++ b/.travis_script.sh
@@ -15,18 +15,17 @@ if [[ "$PERFORM_COVERITY_SCAN" == "1" ]]; then
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- export CFLAGS="-O2 -g -arch i386 -arch x86_64"
+ export CFLAGS="-O2 -g -arch i386 -arch x86_64 --coverage"
export CXXFLAGS="$CFLAGS"
- export LDFLAGS="-arch i386 -arch x86_64"
+ export LDFLAGS="-arch i386 -arch x86_64 -lprofile_rt"
elif [[ "$CODECOV" == "1" ]]; then
export CFLAGS="-O0 -g --coverage"
export CXXFLAGS="$CFLAGS"
- export LDFLAGS="--coverage"
else
export DEB_BUILD_MAINT_OPTIONS="hardening=+all"
export CPPFLAGS="$(dpkg-buildflags --get CPPFLAGS)"
- export CFLAGS="$(dpkg-buildflags --get CFLAGS)"
- export CXXFLAGS="$(dpkg-buildflags --get CXXFLAGS)"
+ export CFLAGS="$(dpkg-buildflags --get CFLAGS) --coverage"
+ export CXXFLAGS="$(dpkg-buildflags --get CXXFLAGS) --coverage"
export LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"
fi
diff --git a/Makefile.am b/Makefile.am
index 852eec9..db04c2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,7 +85,7 @@ CLEANFILES = Makefile.deps.T Makefile.deps \
libcrypt.map libcrypt.map.T \
crypt-symbol-vers.h crypt-symbol-vers.h.T \
crypt-hashes.h crypt-hashes.h.T \
- crypt.h crypt.h.T
+ crypt.h crypt.h.T *.gcda *.gcno
DISTCLEANFILES = .deps/*.Plo