From: Vladimír Vondruš Date: Sat, 20 Apr 2019 15:11:12 +0000 (+0200) Subject: documentation: ignore test files for code coverage. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=4b11da8524ef53246984be5bdfc37f69c38ac371;p=blog.git documentation: ignore test files for code coverage. Stupid fucking istanbul, now it's deprecated and renamed to nyc and there's some magic that puts istanbul into PATH but only in the root directory and I hate that. --- diff --git a/documentation/.coveragerc b/documentation/.coveragerc index 732ceb6d..3a5e2462 100644 --- a/documentation/.coveragerc +++ b/documentation/.coveragerc @@ -1,4 +1,4 @@ [run] omit = - */test/* + */test_*/* */latex2svg.py diff --git a/documentation/.istanbul.yml b/documentation/.istanbul.yml new file mode 100644 index 00000000..594a8079 --- /dev/null +++ b/documentation/.istanbul.yml @@ -0,0 +1,6 @@ +instrumentation: + root: . + extensions: + - .js + default-excludes: true + excludes: ['test_*/**'] diff --git a/package/ci/travis.yml b/package/ci/travis.yml index 2081cab9..c90b1782 100644 --- a/package/ci/travis.yml +++ b/package/ci/travis.yml @@ -67,7 +67,7 @@ script: - if [ "$WITH_DOXYGEN" == "ON" ]; then cd $TRAVIS_BUILD_DIR/documentation && coverage run -m unittest && cp .coverage ../.coverage.doxygen; fi # Test client doxygen JS - - if [ "$WITH_NODE" == "ON" ]; then cd $TRAVIS_BUILD_DIR && istanbul cover documentation/test_doxygen/test-search.js; fi + - if [ "$WITH_NODE" == "ON" ]; then cd $TRAVIS_BUILD_DIR/documentation && node ../node_modules/istanbul/lib/cli.js cover test_doxygen/test-search.js; fi # Test that compiled CSS is up-to-date. First display the diff, then check # with diff-index which should print what's wrong and return with non-zero