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

build: add rule to clean addon tests build #11519

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Feb 23, 2017

Add a rule to the makefile to clean up files generated during testing addons.

Note: when switching from a newer branch, where the addon tests have been built, to an older branch that don't have some of the addon tests, there would be leftover build directories in those test folders.

$ ls test/addons/node-module-version/
binding.cc  binding.gyp build test.js
$ git checkout v4.8.0
$ ls test/addons/node-module-version/
build

test/addons/.buildstamp would try to use node-gyp to build them, only to find the binding.gyp missing. If we run this rule before switching branches, there won't be leftover build and those test folders would not be kept when the branches are switched. I think the test/addons/.buildstamp can have some kind of conditions to avoid that or just delete folders with only build, but not sure what's the appropriate way to do this.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build

@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Feb 23, 2017
@Fishrock123
Copy link
Contributor

yes please

@mscdex mscdex added addons Issues and PRs related to native addons. test Issues and PRs related to the tests. labels Feb 23, 2017
Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. FWIW, there's another add-on in test/gc.

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the same functionality be added to vcbuild.bat so Windows folks have it too?

Copy link
Contributor

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a++ Great work

LGTM

@joyeecheung
Copy link
Member Author

@bnoordhuis Oh yes, though I think that one should be test-gc-clean (corresponds to test-gc), it would be a bit weird if the rules are not symmetrical.

@Trott +1 on the idea of adding this to vcbuild.bat, though I know so little about how to write one and I don't have Windows at the moment (technically one doesn't need Windows to consume it, but still), so I think better leave to another PR if anyone want to do it :)

@joyeecheung
Copy link
Member Author

Hmm...I've tried to do a test-gc-clean but then I think it would be even better if we just have a test-clean that depends on all these tests-cleaning rules and clean them all :D. I think I can get this one in first, meanwhile try to figure out what other test-* rules can be cleaned and make another PR for test-clean and its "parents".

@joyeecheung
Copy link
Member Author

@joyeecheung
Copy link
Member Author

ARM failure is not a failure, as usual..

Landed in 813b312, thanks!

joyeecheung added a commit that referenced this pull request Feb 26, 2017
Add a `test-addons-clean` to the Makefile
to clean up files generated during testing addons.

PR-URL: #11519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 27, 2017
Add a `test-addons-clean` to the Makefile
to clean up files generated during testing addons.

PR-URL: nodejs#11519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
@italoacasas italoacasas mentioned this pull request Feb 27, 2017
jasnell pushed a commit that referenced this pull request Mar 7, 2017
Add a `test-addons-clean` to the Makefile
to clean up files generated during testing addons.

PR-URL: #11519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

Landed in in v6.x-staging. If it should land in v4.x-staging, please open a backport PR

@joyeecheung
Copy link
Member Author

Depends on #10856

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
Add a `test-addons-clean` to the Makefile
to clean up files generated during testing addons.

PR-URL: #11519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. build Issues and PRs related to build files or the CI. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants