-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Coverage script failing #1585
Comments
I think you might be right! Because the permissions are certainly correct:
|
I'm having a similar issue with coverage scripts running https://www.npmjs.com/package/mocha-text-cov haven't dug in too much yet, but I bet coverage fails to output. |
I'm continuing to see some issues on I wouldn't be shocked if there's something legitimate that needs to be patched in |
Same here: with mocha 2.2.1, I am still seeing the permission denied. |
Looks like 1430c2b is the start of this permissions issue. It switches things up a bit for anyone looking to spawn mocha. E.g. not using For @am11's failing build, I pushed a test PR at sass/node-sass#745. It reverts that commit, as seen in: https://github.com/danielstjules/mocha/commit/d84dd02d8fd20243de915dd510af14c5dd9549ff And the results are a passing build https://travis-ci.org/sass/node-sass/builds/53701623. :) So hopefully we can just update the coverage scripts to fix this (and it's not an issue with travis at all). I'll take a look into this tonight (just on lunch). |
@am11 @bcoe Please see sass/node-sass#746 for an example fix |
@danielstjules, it worked! But normally in |
I think the idea was to handle the case where you're invoking a script or mocha with a different node bin than your default, improving flexibility. (#1548) For example (just set this up, my environment isn't usually like this) dstjules:~
$ node --version
v0.12.0
dstjules:~
$ iojs --version
v1.4.2
dstjules:~
$ cat example.js
#!/usr/bin/env node
console.log(process.execPath);
dstjules:~
$ iojs example.js
/usr/local/bin/iojs
dstjules:~
$ ./example.js
/usr/local/bin/node
dstjules:~
$ node example.js
/usr/local/bin/node I suppose the change broke backwards compatibility for that part of the API, though I'm not sure what the best way to handle it is. We can move forward with this interface, but now we have a In any case, glad my PR worked for you. :) |
@boneskull Got a feeling you're online after merging that PR :) Any thoughts on this? |
I got problems capturing the |
Yeah... Definitely caused by Line 73 in 8a60787
Reverting this to |
Ops... Sorry, hadn't read all the comments above. |
I'm pretty sure the problem caused here, in When running with |
Let's try to push this forward? |
I should have time to tackle this tonight |
I think I solved it in this PR to blanket [1], but there's a big list of open PRs there, so IDK. [1] - alex-seville/blanket#479 |
@yamadapc I did the same for node-sass in sass/node-sass#746 However, since the current state of bin/_mocha will result in a string of PRs across projects that use it, it's probably best that we come up with a solution for mocha itself. |
@danielstjules I don't understand why 3p scripts are executing |
(We can revert the change, but I would expect that to be considered "unspported behavior" which should be dropped with a major release.) |
@boneskull I don't think it's worth reverting 1430c2b, if that's what you mean. It handled a valid issue, and it's a good solution. A small quirk was fixed in #1567, and #1616 reverts that bin file to once again being executable. As for why // -------------------------------------
// example.js
// -------------------------------------
it('test', function() {
console.log(process.env.CUSTOM);
});
// -------------------------------------
// run.js, similar to coverage.js
// -------------------------------------
var path = require('path'),
spawn = require('child_process').spawn;
process.env.CUSTOM = 'SET_BY_RUN';
var mocha = spawn('./bin/mocha', ['example.js'], {
env: process.env
});
mocha.on('error', function(err) {
console.error(err);
process.exit(1);
});
mocha.stderr.setEncoding('utf8');
mocha.stderr.on('data', function(err) {
console.error(err);
process.exit(1);
});
mocha.stdout.pipe(process.stdout);
// -------------------------------------
// test
// -------------------------------------
$ node ./run.js
SET_BY_RUN
․
1 passing (4ms) This query reveals some projects relying on |
@boneskull I agree that I don't think it's worth reverting, I've put a pull into Blanket (based on @yamadapc's hard work debugging) that solves the issues I've seen. Having seen the cause of the bug, I think the onus is on Blanket to fix the issue (hopefully they start merging things soon) CC: @alex-seville. |
@boneskull In the meantime, before we intentionally deprecate invoking |
Closing via #1616. Anyone relying on |
Redirected from: travis-ci/travis-ci#3347
Hi, we have a coverage script in node-sass for TravisCI. It was last updated on Nov 4 2014. It was reporting coverage to covealls till yesterday when I bumped mocha version sass/node-sass@c9ed930. Now we get permission denied on TravisCI: https://travis-ci.org/sass/node-sass/jobs/53495198#L1320 on running the coverage script (after passing all tests with mocha).
If I downgrade mocha to 2.1.0, the result is: https://travis-ci.org/am11/node-sass/jobs/53533514#L1310:
Is it related to #1567?
The text was updated successfully, but these errors were encountered: