aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-09-30 16:08:15 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-09-30 16:08:15 -0700
commitb3ca2ad3adcde09b1841b1aa3b9b5905ed26226b (patch)
tree16e8057de36dc9a3e2a13e37ad764035d1420d17 /tools
parentb4499af627e37ae8f025ee3df72db678e28109d0 (diff)
parentd7d8337df091c90fed6066a28059ae88a910ce52 (diff)
Merge pull request #3583 from murgatroid99/node_coverage
Node test coverage reporting
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests/run_node.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh
index bcd93ed226..1043b447db 100755
--- a/tools/run_tests/run_node.sh
+++ b/tools/run_tests/run_node.sh
@@ -37,6 +37,19 @@ cd $(dirname $0)/../..
root=`pwd`
+cd $root/src/node
+
export LD_LIBRARY_PATH=$root/libs/$CONFIG
-$root/src/node/node_modules/mocha/bin/mocha --timeout 8000 $root/src/node/test
+if [ "$CONFIG" = "gcov" ]
+then
+ ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \
+ --timeout 8000
+ cd build
+ gcov Release/obj.target/grpc/ext/*.o
+ lcov --base-directory . --directory . -c -o coverage.info
+ genhtml -o ../ext_coverage --num-spaces 2 -t 'Node gRPC test coverage' \
+ coverage.info
+else
+ ./node_modules/mocha/bin/mocha --timeout 8000
+fi