| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
cc: @nodejs/build , @joaocgreis , @refack |
Sorry, something went wrong.
|
Could it be moved to in a separate .bat file (in tools/ or tools/msvs/)?
|
Sorry, something went wrong.
@refack That's no different from the existing tools/make-v8.sh script though: it checks out depot_tools when you run make test-v8. Tangential: I don't think depot_tools is needed to build d8 (could use ./configure --enable-d8 for that) but it also downloads things like test262 that are used in V8's test suite. @kunalspathak This needs a rebase. |
Sorry, something went wrong.
Just to explain myself: I ment a new batch file that could be called from vcbuild.bat (or on it's own if that's effortless). |
Sorry, something went wrong.
@refack - Yes, makes sense. I will rebase and update the PR with review comments. |
Sorry, something went wrong.
|
I believed the objective of running the V8 tests from our tree was to test our floating patches using the V8 test suite (as mentioned in nodejs/build#199, this would be used to test a PR that adds a floating patch to V8). So, I didn't understand the rd /S /Q v8 in this PR, but then I noticed a similar rm -rf v8 was added to make-v8.sh in #9393, which is currently in master. Doesn't this completely defeat the purpose of testing V8 from our tree? Can't we trust that the V8 branch this ends up testing has been fully tested upstream? Shouldn't this tool use the V8 test suite on the V8 tree without removing our floating patches? |
Sorry, something went wrong.
|
Thanks @joaocgreis for bring this up. While I was working on refactoring to move make v8 part in separate script, i realized that in unix version, cleanup happens inside make-v8.sh before building and running v8 test. I am not sure if I follow this completely. Isn't it undoing the fetch/sync part or am i missing something? |
Sorry, something went wrong.
|
Hi,
So, it should test the V8 which is part of Node (including any floating patches). |
Sorry, something went wrong.
@jbajwa If I understand you correctly, here we do not need all the depot_tools actions, as the code in the node tree should be tested as is, right? |
Sorry, something went wrong.
|
fetch v8 and gclient sync would still be needed to get the correct deps for
v8 makefile to work. The v8 source is tested as is from the node tree.
…On Sun, Jul 9, 2017 at 7:25 PM Refael Ackermann ***@***.***> wrote:
So, it should test the V8 which is part of Node (including any floating
patches).
@jbajwa <https://github.com/jbajwa> If I understand you correctly, here
we do not need all the depot_tools actions, as the code in the node tree
should be tested as is, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13992 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjQGojz8uqxXi_GQLtn6J_MYjLahPoqks5sMWFNgaJpZM4OJ61B>
.
|
Sorry, something went wrong.
|
@jbajwa I see now, thanks for the explanation! That's cleverly done. @kunalspathak cleanup returns to the version of V8 in node with the floating patches, but keeping all the necessary files for building and testing V8 (because they are conveniently gitignored). So, this PR is missing that step before building. In the Unix version, cleanup is registered with trap to run if the script is cancelled. I don't think this is straightforward to do in cmd, but is not essential. You might also consider running make-v8.sh with Git Bash - we already require the git tools for testing and what this is doing actually increases the dependency on git. While for actually running tests it is always better to use cmd (to avoid tty being a pipe), for a setup stage I believe reusing the script would be better. |
Sorry, something went wrong.
Just backing up @joaocgreis - I'm using the Git-for-Windows make to run make lint and some git hooks, works very well. |
Sorry, something went wrong.
@joaocgreis - Thanks for the suggestion, i didn't realize that we could do this. I will test it out and if it works then I will re-use make-v8.sh.
Yes, I realized it when i was refactoring. I mis-read cleanup function and was calling at the end of test. I will fix it. |
Sorry, something went wrong.
|
@kunalspathak just to be sure we're on the same page: those are mutually exclusive steps, if you re-use make-v8.sh then cleanup is not needed in vcbuild.bat. |
Sorry, something went wrong.
|
Yep, i understand that 😄 |
Sorry, something went wrong.
|
ping. any other comments? |
Sorry, something went wrong.
There was a problem hiding this comment.
Some questions (not really sure about any of them, I don't know enough about batch).
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe restorecwd or similar? I thought this was changing the %PATH%.
Sorry, something went wrong.
There was a problem hiding this comment.
sure.
Sorry, something went wrong.
There was a problem hiding this comment.
Is there a reason this is defined twice?
Sorry, something went wrong.
There was a problem hiding this comment.
One of them need to go
Sorry, something went wrong.
There was a problem hiding this comment.
This should not be defined twice. I will remove one.
Sorry, something went wrong.
There was a problem hiding this comment.
Second definition here.
Follow on question, as it's only called once, is there a need for a separate goto for it at all? IDK what others think, but for me every goto adds significant mental complexity, so if it's avoidable I'd like to avoid it.
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe this should be part of the exit process for vcbuild.bat. I see we cd %~dp0 at the beginning, is there a reason not do do it at the end as well (cc/ @joaocgreis )?
Sorry, something went wrong.
There was a problem hiding this comment.
popd
Sorry, something went wrong.
There was a problem hiding this comment.
AIUI if any of the above commands fail then the user's PATH is not restored. Same question as for %dp0, should we be doing this as part of exit?
I guess you could do:
if defined savedpath set path=%savedpath%and then any other part of the script that modifies the path wouldn't have to worry about resetting it.
Sorry, something went wrong.
There was a problem hiding this comment.
Is there a reason you went with CAPS for %DEPOT_TOOLS_PATH% but not elsewhere? I know Windows env vars are case-agnostic, but I'm not sure if there are any common defaults people use (e.g. lowercase for local, uppercase for global).
Sorry, something went wrong.
There was a problem hiding this comment.
%DEPOT_TOOLS_PATH% if defined by depot_tools so it's not our call.
Sorry, something went wrong.
There was a problem hiding this comment.
But if %DEPOT_TOOLS_PATH% is defined, doesn't that mean that %depot_tools_path% is also defined?
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah but that's not cricket.
Sorry, something went wrong.
There was a problem hiding this comment.
@gibfahn - I followed the syntax of environment variables defined outside the script to be all caps. e.g. VS140COMNTOOLS, PROCESSOR_ARCHITEW6432, etc. I see that some tooling related environment variables are also all caps, e.g. GYP_MSVS_VERSION. But again i am open to change if you strongly feel like that.
Sorry, something went wrong.
There was a problem hiding this comment.
So for these two commands if something fails then will there be any output? I assume you're &> nul because otherwise it spews too much out to the screen, but (e.g. if we start running this in CI) it might be useful to know what went wrong. Or maybe it just doesn't really fail?
I guess you could output to a logfile, and then echo something at the beginning saying errors logged to blah.log (or whatever it should be).
Sorry, something went wrong.
There was a problem hiding this comment.
I see no reason to swallow or log to file. Let it flow just like in the call to MSbuild
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, primary reason was it was outputing a lot. I like @refack suggestion and will let it flow like msbuild.
Sorry, something went wrong.
There was a problem hiding this comment.
One of them need to go
Sorry, something went wrong.
There was a problem hiding this comment.
I see no reason to swallow or log to file. Let it flow just like in the call to MSbuild
Sorry, something went wrong.
There was a problem hiding this comment.
not needed as it's a precondition for this whole script and done in L3
Sorry, something went wrong.
There was a problem hiding this comment.
yep.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd rather require this as a precondition for running.
Test, and if it's not set, err, like with if not defined DEPOT_TOOLS_PATH
If all you need is ninja you could
where ninja > nul 2>nul
if errorlevel 1 echo depot_tools not set-up & goto exit
Sorry, something went wrong.
There was a problem hiding this comment.
Didn't follow you. if not defined DEPOT_TOOLS_PATH would make sure depot_tools are in path. If ninja is not there, it will anyway fail when invoked. I know it is better to check upfront, but sync script calls other tools/scripts that also have to be in path and if not, things will fail when invoked.
Sorry, something went wrong.
There was a problem hiding this comment.
AFAIK when depot_tools are set-up Path already includes DEPOT_TOOLS_PATH, so if you could test that and fail, it would be nicer than manipulation the Path.
If it's not simple, then current solution is Ok.
Sorry, something went wrong.
There was a problem hiding this comment.
let the output flow
Sorry, something went wrong.
There was a problem hiding this comment.
sure.
Sorry, something went wrong.
There was a problem hiding this comment.
not: I'd prefer you align to if /i "%1"=="test-check-deopts"
Sorry, something went wrong.
There was a problem hiding this comment.
There are other checks that are not aligned. e.g. test-all above. test-v8 aligns to test-all and other shorter if checks.
Sorry, something went wrong.
There was a problem hiding this comment.
pushd
Sorry, something went wrong.
There was a problem hiding this comment.
popd
Sorry, something went wrong.
There was a problem hiding this comment.
I'd still would like this block to move to tools\test-v8.cmd
and here leave
call tools\test-v8.cmd goto cpplint
AFAICT everything else will fall into place.
Sorry, something went wrong.
There was a problem hiding this comment.
Is this still needed?
Sorry, something went wrong.
There was a problem hiding this comment.
weird, I thought I removed this and moved it to test-v8.bat. I will remove it. Sorry about that.
Sorry, something went wrong.
There was a problem hiding this comment.
Now you can SETLOCAL and ENDLOCAL in :test-v8-exit and then I don't care what monstrosities you do to poor old Path
Sorry, something went wrong.
|
Ohhhh, so pretty. If only we used the sub-script approach earlier.... |
Sorry, something went wrong.
|
@gibfahn - Do you have any other comments or should we land this? |
Sorry, something went wrong.
|
I will land this PR tomorrow if no one objects. |
Sorry, something went wrong.
`vcbuild.bat test-v8` : Runs unit test from v8 repo `vcbuild.bat test-v8-intl` : Runs intl test from v8 repo `vcbuild.bat test-v8` : Runs benchmarks from v8 repo The runs needs https://www.chromium.org/developers/how-tos/install-depot-tools installed on the machine expects environment variable `DEPOT_TOOLS_PATH` to be set to the path. Set environment variable `DISABLE_V8_I18N` to disable i18n. PR-URL: nodejs#13992 Refs: nodejs#4704 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Sorry, something went wrong.
`vcbuild.bat test-v8` : Runs unit test from v8 repo `vcbuild.bat test-v8-intl` : Runs intl test from v8 repo `vcbuild.bat test-v8` : Runs benchmarks from v8 repo The runs needs https://www.chromium.org/developers/how-tos/install-depot-tools installed on the machine expects environment variable `DEPOT_TOOLS_PATH` to be set to the path. Set environment variable `DISABLE_V8_I18N` to disable i18n. PR-URL: #13992 Refs: #4704 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
|
Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label. |
Sorry, something went wrong.
|
ping @nodejs/platform-windows |
Sorry, something went wrong.
|
I don't think this needs to be backported to v6. This is mainly to test floating patches on V8, I believe those will not be common in v6 in the future. |
Sorry, something went wrong.
|
Every time we need to float a new V8 patch we should run those tests. It isn’t 100% necessary but nice to have
|
Sorry, something went wrong.
|
I'll backport. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a port of #4704 for windows.
Related discussion: nodejs/build#577 (comment)
vcbuild.bat test-v8 : Runs unit test from v8 repo
vcbuild.bat test-v8-intl : Runs intl test from v8 repo
vcbuild.bat test-v8 : Runs benchmarks from v8 repo
The runs needs depot_tools
installed on the machine expects environment variable DEPOT_TOOLS_PATH to be set to the path.
Set environment variable DISABLE_V8_I18N to disable i18n.
I verified this on my machine and it works as expected. But would love to setup a CI machine that contains depot_tools installation and try it out.
Checklist
Affected core subsystem(s)
build