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
test,doc: enable running embedtest for Windows #52646
base: main
Are you sure you want to change the base?
Conversation
Review requested:
|
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.
We already have tools/executable_wrapper.h
and AFAICT it serves the same purpose. Not sure why this wasn't done for the embedtest although that wrapper was introduced later when we do need to create executable that also works on Windows (js2c). Can we just use that for the embedtest?
Great! It could work. For the PR #43542 I will need to make |
IIUC to share code with #43542 ultimately we need to expose a helper like |
It seems that we can avoid converting the As for the |
It seems that macOS benchmark is failing, but the failure is not related to changes in this PR. |
I think that is one of the known flaky tests, restarted the github action on macOS |
I think the reason why we don't do that is, we generally try to keep |
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.
LGTM
It seem that CI shows that the new embedding testing is failing on Windows and it is related to this PR. I am going to investigate/fix it. I wonder if the
|
51f2daa
to
73d5bda
Compare
Failed to start CI⚠ Something was pushed to the Pull Request branch since the last approving review. ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/8958495093 |
I had to rebase the PR since the test break on Windows seemed to be caused by PR being submitted against Node.js version 22 while now we have the version 23. |
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.
LGTM
Currently the
embedtest
does not run on Windows.One of the main reasons is that the Windows command line does not accept UTF-8 characters required by the test.
In this PR we enable
embedtest
to run on Windows:node::FixupMain
fromtools/executable_wrapper.h
to fixargc
andargv
values. TheNODE_MAIN
macro is defined aswmain
for Windows targets that receives parameters as UTF-16. Then, thenode::FixupMain
converts them to UTF-8.embedtest
tovcbuild.bat
as a part ofcctest
call. It is currently implemented the same way in theMakefile
.Makefile
is changed to addtools
include directory for theembedtest
project. It is need to include theexecutable_wrapper.h
.embedding.md
file.