Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update everything #20

Merged
merged 4 commits into from
Aug 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export PATH="$(pwd):$PATH"

# if we don't have our npm dependencies available, build node and fetch them
# with npm
if [ ! -x "$SRCDIR/node_modules/.bin/istanbul" ] || \
if [ ! -x "$SRCDIR/node_modules/.bin/nyc" ] || \
[ ! -x "$SRCDIR/node_modules/.bin/istanbul-merge" ]; then
echo "Building, without lib/ coverage..." >&2
./configure
Expand All @@ -47,17 +47,17 @@ if [ ! -x "$SRCDIR/node_modules/.bin/istanbul" ] || \

cd "$SRCDIR"

# get istanbul
node "$WORKDIR/node/deps/npm" install
# get nyc + istanbul-merge
./node "$WORKDIR/node/deps/npm" install

test -x "$SRCDIR/node_modules/.bin/istanbul"
test -x "$SRCDIR/node_modules/.bin/nyc"
test -x "$SRCDIR/node_modules/.bin/istanbul-merge"
fi

cd "$WORKDIR/node"

echo "Instrumenting code in lib/..." >&2
"$SRCDIR/node_modules/.bin/istanbul" instrument lib/ -o lib_/
"$SRCDIR/node_modules/.bin/nyc" instrument lib/ lib_/
sed -e s~"'"lib/~"'"lib_/~g -i~ node.gyp

echo "Removing old coverage files" >&2
Expand All @@ -77,10 +77,11 @@ python tools/test.py --mode=release -J \
addons doctool known_issues pseudo-tty parallel sequential

echo "Gathering coverage..." >&2
mkdir -p coverage
"$SRCDIR/node_modules/.bin/istanbul-merge" --out coverage/libcov.json \
mkdir -p coverage .cov_tmp
"$SRCDIR/node_modules/.bin/istanbul-merge" --out .cov_tmp/libcov.json \
'out/Release/.coverage/coverage-*.json'
"$SRCDIR/node_modules/.bin/istanbul" report --include coverage/libcov.json html
(cd lib && "$SRCDIR/node_modules/.bin/nyc" report \
--temp-directory "$(pwd)/../.cov_tmp" -r html --report-dir "../coverage")
(cd out && "$WORKDIR/gcovr/scripts/gcovr" --gcov-exclude='.*deps' --gcov-exclude='.*usr' -v \
-r Release/obj.target/node --html --html-detail \
-o ../coverage/cxxcoverage.html)
Expand All @@ -94,7 +95,7 @@ cp -rv coverage "$OUTDIR/coverage-$COMMIT_ID"
JSCOVERAGE=$(grep -B1 Lines coverage/index.html | \
head -n1 | grep -o '[0-9\.]*')
CXXCOVERAGE=$(grep -A3 Lines coverage/cxxcoverage.html | \
grep style|grep -o '[0-9\.]*')
grep style | grep -o '[0-9]\{1,3\}\.[0-9]\{1,2\}')

echo "JS Coverage: $JSCOVERAGE %"
echo "C++ Coverage: $CXXCOVERAGE %"
Expand Down
8 changes: 0 additions & 8 deletions gcovr-patches.diff
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,3 @@ index 034779c86d29..e68b239c424f 100755
if options.root is not None:
if not options.root:
sys.stderr.write(
@@ -2155,6 +2158,7 @@ if options.root is not None:
else:
root_dir = starting_dir
options.root_filter = re.compile(re.escape(root_dir + os.sep))
+ starting_dir = root_dir

for i in range(0, len(options.filter)):
options.filter[i] = re.compile(options.filter[i])
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"url": "https://github.com/addaleax/node-core-coverage/issues"
},
"dependencies": {
"istanbul": "^0.4.3",
"istanbul-merge": "^1.1.0"
"istanbul-merge": "^1.1.0",
"nyc": "^8.0.0-candidate"
},
"homepage": "https://github.com/addaleax/node-core-coverage#readme",
"license": "MIT",
Expand Down