Skip to content
Snippets Groups Projects
Commit c23b7df8 authored by Michael Lumish's avatar Michael Lumish
Browse files

Merge pull request #3609 from nicolasnoble/html-reports

Adding crude html report support.
parents a8af908a 4d977077
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ objs ...@@ -8,6 +8,7 @@ objs
python*_virtual_environment python*_virtual_environment
# gcov coverage data # gcov coverage data
reports
coverage coverage
*.gcno *.gcno
......
...@@ -74,6 +74,10 @@ then ...@@ -74,6 +74,10 @@ then
docker cp "$DOCKER_CID:/var/local/git/grpc/$XML_REPORT" $git_root docker cp "$DOCKER_CID:/var/local/git/grpc/$XML_REPORT" $git_root
fi fi
docker cp "$DOCKER_CID:/var/local/git/grpc/reports.zip" $git_root || true
unzip $git_root/reports.zip -d $git_root || true
rm -f reports.zip
# remove the container, possibly killing it first # remove the container, possibly killing it first
docker rm -f $DOCKER_CID || true docker rm -f $DOCKER_CID || true
......
...@@ -42,4 +42,18 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc ...@@ -42,4 +42,18 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
nvm use 0.12 nvm use 0.12
rvm use ruby-2.1 rvm use ruby-2.1
mkdir -p reports
$RUN_TESTS_COMMAND $RUN_TESTS_COMMAND
cd reports
echo '<html><head></head><body>' > index.html
find . -maxdepth 1 -mindepth 1 -type d | sort | while read d ; do
d=${d#*/}
n=${d//_/ }
echo "<a href='$d/index.html'>$n</a><br />" >> index.html
done
echo '</body></html>' >> index.html
cd ..
zip -r reports.zip reports
...@@ -43,13 +43,13 @@ export LD_LIBRARY_PATH=$root/libs/$CONFIG ...@@ -43,13 +43,13 @@ export LD_LIBRARY_PATH=$root/libs/$CONFIG
if [ "$CONFIG" = "gcov" ] if [ "$CONFIG" = "gcov" ]
then then
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \ ./node_modules/.bin/istanbul cover --dir ../../reports/node_coverage \
--timeout 8000 ./node_modules/.bin/_mocha -- --timeout 8000
cd build cd build
gcov Release/obj.target/grpc/ext/*.o gcov Release/obj.target/grpc/ext/*.o
lcov --base-directory . --directory . -c -o coverage.info lcov --base-directory . --directory . -c -o coverage.info
genhtml -o ../ext_coverage --num-spaces 2 -t 'Node gRPC test coverage' \ genhtml -o ../../../reports/node_ext_coverage --num-spaces 2 \
coverage.info -t 'Node gRPC test coverage' coverage.info
else else
./node_modules/mocha/bin/mocha --timeout 8000 ./node_modules/mocha/bin/mocha --timeout 8000
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment