-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: make addon testing part of make test
#6232
Conversation
I'm very much in favor of this change. One thing worth mentioning is the flakyness of When testing on osx I fairly often have to run the command twice in a row due to some issue I've never quite hunted down. Am I the only one experiencing this? @bnoordhuis I can try apply this patch to a couple different parts of the tree and see if I can repro the failures if you like |
I spent some time last year sorting out build dependencies and |
I've seen the same flakiness on OS X but like @thealphanerd I haven't had a chance to track it down. I'll see if I can get some info later on today. |
All of this sounds terrible familiar, so I believe I have... To clarify, on OS X once in a while we catch a "bad add-on build". That is plugging this "bad add-on" crashes reproducibly. It is not flaky in the sense that plugging may or may not work. Only rebuilding the add-on resolves the issue, right? I tracked this down to a variant of what is sometimes called the C++ static initialization order fiasco. IIRC, it boils down to this: Both the initialization of the Apparently this is no problem on ELF systems. The order is deterministic and correct. However, on Mach-O systems the order is non-deterministic and once in while we catch a bad build. I fixed this in this commit while working on #2329, mostly as an afterthought. It popped up in the CI build. So, why is this not a problem in the real world? This has to do with the circumstances mentioned above. Most add-ons use simple
It still isn't easy to catch, though. I used an infinite rebuild-test-clean-loop... |
I spent some time trying to reproduce this but it seems gone ... So unless anyone else is able to reproduce, forget what I said. ;) |
7da4fd4
to
c7066fb
Compare
@thealphanerd @jasnell Any luck? If not, I'd like to land this. |
@bnoordhuis ... don't let me hold it up, I haven't had a chance to investigate further. |
We may as well land this and if we start hitting the edge case often we can then start to fix it. I am pretty sure that we will, but cannot reliably reproduce |
8ac7615
to
9c61aaf
Compare
Rebase and new CI: https://ci.nodejs.org/job/node-test-pull-request/2450/ |
LGTM |
Otherwise it's too easy to miss breaking changes to node.h and other public headers until the CI catches them. `vcbuild test` tests addons so there is precedence. PR-URL: nodejs#6232 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
9c61aaf
to
628ae25
Compare
Otherwise it's too easy to miss breaking changes to node.h and other public headers until the CI catches them. `vcbuild test` tests addons so there is precedence. PR-URL: #6232 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Otherwise it's too easy to miss breaking changes to node.h and other public headers until the CI catches them. `vcbuild test` tests addons so there is precedence. PR-URL: nodejs#6232 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Checklist
Affected core subsystem(s)
test
Description of change
build: make addon testing part of
make test
Otherwise it's too easy to miss breaking changes to node.h and other
public headers until the CI catches them.
vcbuild test
tests addonsso there is precedence.
(
test:
is perhaps a better prefix but most commits toMakefile
prefix withbuild
. I follow slavishly.)CI: https://ci.nodejs.org/job/node-test-pull-request/2284/