-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Set up pytest node tests #1717
Set up pytest node tests #1717
Conversation
|
Okay we're up to 666/735 core node tests passing and 7 I've xfailed because they use many browser-only APIs. Of the 68 remaining failures, 60 are cascading failures due to timeouts in Also, the node tests are REALLY slow. I'm not sure why they are so slow tbh, but it's actually about similar to what happened on my libffi port. There, node tests take 15x longer (sometimes even more), here they only take 6x longer than the selenuim tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
xfailing those tests sound good to me.
Interestingly with my node test driver, the time difference between selenium_standalone and selenium doesn't seem very large. test-core-node takes 6x as long as test-core-chrome but test-packages-node only takes 1.25x as long.
Might be due to a 50ms sleep by default after each send command and you are sending line by line.. https://stackoverflow.com/a/60423834/1791279
I think we would need to figure out how to make the test-core[node]
faster (if the above idea doesn't work) as otherwise >1h run time is going to difficult to manage in CI and it might mean that we won't be able to run it on PRs (since we only have 4 parallel jobs in CircleCI)
ADD docs/requirements-doc.txt requirements.txt / | ||
|
||
RUN pip3 --no-cache-dir install -r /requirements.txt \ | ||
&& pip3 --no-cache-dir install -r /requirements-doc.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's indeed much better thanks!
Hmm. I guess I can try sending all at once.
I am working on embedding node into a Python extension so we can avoid this ./configure --shared
make -j4 so I think it would be okay to stash |
In the above SO link, there was also the option of setting that sleep value to 0 which should help.
Yeah, we can't reasonably ask people to build node from sources. I think shipping a Maybe profiling a typical pexpect session to understand what's going on would help? |
Well this isn't a key aspect of the project, I think we could just tell people that to run node tests they should either use docker or acquire a |
Apparently |
True, but it would overall make contributing more complex if say one of the node tests failed and one need to reproduce. Also even to include that .so into Docker doesn't sound straightforward. I would rather not compile node even for building Docker images. My point is that it would be good to first try to understand why pexpect is slow. Serializing strings for input/output shouldn't be that much overhead. |
Yeah "embed node into a python module" is a bit in the fun but logistically impractical direction. Also, it's pretty incredible how much better the docs for the Python C api are than for the Node C++ API. The Node / v8 API seems significantly more complicated but the docs are close to nonexistent. |
I'm not too familiar with electron distros, but I agree that one of the challenges we have is really to keep the tools we use as simple as possible. It's already and a very complex build setup, so the more additional tools we use the more difficult it is for new contributors to approach it (and also for us to have solid enough expertise in those tools). |
Here's the discussion where people said it would be good to ship an There is also metacall but documentation is very thin. |
It looks like electron links |
Yeah hopefully we can make |
Looks like |
Looks like we already xfailed the pillow test on chrome and firefox. I think this is all ready now. |
@rth Tests all pass. I think this is ready to merge, unless you have further comments. |
Thanks for working on this @hoodmane ! |
Set up pytest node tests (pyodide#1717)
No description provided.