chiark / gitweb /
documentation: ignore test files for code coverage.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 20 Apr 2019 15:11:12 +0000 (17:11 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Sat, 20 Apr 2019 15:55:39 +0000 (17:55 +0200)
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
documentation/.istanbul.yml [new file with mode: 0644]
package/ci/travis.yml

index 732ceb6dd91d85a2d719c56cc5c52ee8be551940..3a5e2462f306fc400d99c8168b9a8669fa24531f 100644 (file)
@@ -1,4 +1,4 @@
 [run]
 omit =
-    */test/*
+    */test_*/*
     */latex2svg.py
diff --git a/documentation/.istanbul.yml b/documentation/.istanbul.yml
new file mode 100644 (file)
index 0000000..594a807
--- /dev/null
@@ -0,0 +1,6 @@
+instrumentation:
+    root: .
+    extensions:
+        - .js
+    default-excludes: true
+    excludes: ['test_*/**']
index 2081cab91d86fe0ff76ccb0389cedabcdc32ddd0..c90b178248991f6823b0f2d8fc4bfcfbc7e049c5 100644 (file)
@@ -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