From 4b11da8524ef53246984be5bdfc37f69c38ac371 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 20 Apr 2019 17:11:12 +0200 Subject: [PATCH] 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. --- documentation/.coveragerc | 2 +- documentation/.istanbul.yml | 6 ++++++ package/ci/travis.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 documentation/.istanbul.yml 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 -- 2.30.2