Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

Test basic functionality of gyp + npm #15

Closed
MylesBorins opened this issue Feb 8, 2016 · 5 comments
Closed

Test basic functionality of gyp + npm #15

MylesBorins opened this issue Feb 8, 2016 · 5 comments

Comments

@MylesBorins
Copy link
Contributor

It should be obvious if a change is going to break basic functionality of either gyp or npm. Having either broken on master breaks testing infrastructure and smoke testing

nodejs/node@1124de2 is an example of a recent change that broke both utilities on master. requiring internal/utils in fs broke both npm and node-gyp which had dependencies that were monkey patching fs.

While we are not going to test for userland monkey patching fs, had we been testing npm + gyp functionality we would have been able to catch this problem before it landed.

I'll start hacking something together for npm (although I'm open to suggestions from @nodejs/npm) @trevnorris or @nodejs/node-gyp might have an idea for gyp

@MylesBorins
Copy link
Contributor Author

Submitted basic test for npm nodejs/node#5166

@rvagg
Copy link
Member

rvagg commented Feb 12, 2016

I have my head in node-gyp atm, adding some more stuff and running tests and remembering how difficult it is to test. There's a setup that uses Docker to do some integration testing @ https://github.com/nodejs/node-gyp/blob/master/test/docker.sh but afaik I'm the only one who's ever run it (I'm just finding that it's currently a tiny bit busted with the current version of Docker). Probably has limited usefulness however.

My basic tests with node-gyp pretty much always involve compiling buffertools as it's the simplest addon package I know, doesn't have dependencies and @bnoordhuis always keeps it working. The Docker integration testing uses it, I also use it here for a script that can be used to test if any Node installation works (on anything but Windows): https://deb.nodesource.com/test (curl -sL https://deb.nodesource.com/test | bash -).

For testing here, we probably need to do something like npm install buffertools --nodedir $(pwd). It'd be nice to do the full thing where it has to download header files but without some crazy proxy work that's nearly impossible in this situation cause we're not testing versions that have header files available on nodejs.org.

@richardlau
Copy link
Member

richardlau commented Dec 18, 2016

Basic node-gyp testing is covered now we are testing test/addons in the CI?

@bnoordhuis
Copy link
Member

That, and upstream node-gyp has grown some add-on tests as well.

@richardlau
Copy link
Member

We broke compiling addons in v7.7.0: nodejs/node#11628

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants