summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-01 13:37:27 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-01 14:50:09 +0000
commit81e661f28b487bf194ff9dda9b36699f9e55915e (patch)
treea4d1d2865d9e41e66fabcd9a94a495881fc79746 /.travis.yml
parentb753009a380a103c024ffdd313f43d4fa44f0ef5 (diff)
travis: Add automated coverage testing using coveralls.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml15
1 files changed, 13 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 205c3cef1..c598783f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,8 @@ before_script:
- sudo apt-get install -y python3.4 python3 gcc-4.7 gcc-multilib gcc-arm-none-eabi qemu-system mingw32
# For teensy build
- sudo apt-get install realpath
+ # For coverage testing
+ - sudo pip install cpp-coveralls
script:
- make -C minimal test
@@ -25,8 +27,17 @@ script:
- make -C cc3200 BTARGET=bootloader BTYPE=release
- make -C windows CROSS_COMPILE=i586-mingw32msvc-
- - (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests)
- - (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests --emit native)
+ # run tests without coverage info
+ #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests)
+ #- (cd tests && MICROPY_CPYTHON3=python3.4 ./run-tests --emit native)
+
+ # run tests with coverage info
+ - make -C unix CC=gcc-4.7 coverage
+ - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../unix/micropython_coverage ./run-tests)
+ - (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../unix/micropython_coverage ./run-tests --emit native)
+
+after_success:
+ - (cd unix && coveralls --root .. --build-root . --gcov $(which gcov-4.7) --gcov-options '\-o build-coverage/' --include py --include extmod)
after_failure:
- (cd tests && for exp in *.exp; do testbase=$(basename $exp .exp); echo -e "\nFAILURE $testbase"; diff -u $testbase.exp $testbase.out; done)