Skip to content

Commit

Permalink
Fix the null string being piped to coveralls
Browse files Browse the repository at this point in the history
The problem here is that `lcov-result-merger` expects exactly one or
exactly two arguments; the first is expected to be a glob which will
be expanded _internally in the program_ and the second is expected to
be an output file. Because of this, before this change,
`lcov-result-merger` would intepret the as-root coverage data as the
output file and write data there instead of piping it to
stdout. `coveralls` would thus receive no data from stdin and
interpret this as a null string, causing the "cannot parse lcov" error in
Travis.

So we adjust the invocation so that we only use one argument, a glob
which matches both sets of coverage data. Since it doesn't have a
second argument `lcov-result-merger` will start behaving as one might
expect and output to stdout, which then gets piped to Coveralls.
  • Loading branch information
strugee committed Sep 12, 2017
1 parent abd6d0d commit c45075f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"test:system": "vows -v test/*-test-system.js",
"test:systemd": "docker run -v $(pwd):/tmp/pump.io:ro -v $NVM_DIR:/.nvm:ro ubuntu sh -c \"export NVM_DIR=$NVM_DIR; . $NVM_DIR/nvm.sh; nvm use $TRAVIS_NODE_VERSION; cd /tmp/pump.io; npm run test:systemd:run\"",
"test:systemd:run": "mkdir -p /tmp/pump.io/uploads; sed 's/%i.service//g' pump.io@.service | sudo tee /etc/systemd/system/pump.io.service; sudo systemctl daemon-reload; sudo systemctl start pump.io.service; npm run test:system",
"test:report-coverage": "lcov-result-merger coverage/lcov.info coverage-root/lcov.info | coveralls",
"test:report-coverage": "lcov-result-merger 'coverage*/lcov.info' | coveralls",
"lint": "npm run lint:jshint && npm run lint:jscs && npm run lint:jade && npm run lint:json && npm run lint:deps",
"lint:deps": "dependency-check package.json test/*.js > /dev/null && dependency-check --unused package.json -i dependency-check -i jscs -i jshint -i jsonlint -i pug-lint -i nyc -i lcov-result-merger -i coveralls test/*.js > /dev/null",
"lint:jshint": "jshint --exclude 'public/javascript/libs' bin/* lib routes public/javascript test",
Expand Down

0 comments on commit c45075f

Please sign in to comment.