-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
tools: add the bootstrapped _depot_tools dir to the PATH (for V8 tests) #38299
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
Closed
DeeDeeG
wants to merge
3
commits into
nodejs:master
from
DeeDeeG:put-depot_tools-ninja-on-PATH-for-test-v8
Closed
tools: add the bootstrapped _depot_tools dir to the PATH (for V8 tests) #38299
DeeDeeG
wants to merge
3
commits into
nodejs:master
from
DeeDeeG:put-depot_tools-ninja-on-PATH-for-test-v8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target.
DeeDeeG
commented
Apr 19, 2021
This comment has been minimized.
This comment has been minimized.
richardlau
approved these changes
Apr 23, 2021
Simplifies the script... Also finds _depot_tools relative to the current path, rather than relative to the repo root. This seems like a good idea, given that the rest of the script is also relative to the current path (`deps/v8`), not the repo root.
|
I did some tiny updates:
(So, it's one less line of code, and slightly more robust to potential repo refactoring or moving folders around, or at least that's the idea.) I opted not to remove
|
richardlau
approved these changes
Apr 23, 2021
jasnell
approved these changes
Apr 27, 2021
|
Landed in 6e3ce65 |
jasnell
pushed a commit
that referenced
this pull request
Apr 27, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Apr 29, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 30, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 5, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 5, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jun 11, 2021
Ensures the `_depot_tools` dir bootstrapped during this script is added to the PATH, before `ninja` is executed, as `_depot_tools` already has a copy of `ninja` in it. This means one less system requirement to be able to run this script. (It seems like this was already intended to be on the PATH?) Note: This script is used by the `test-v8` Makefile target. PR-URL: #38299 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short summary:
This script needs to execute a copy of
ninjain order to complete.The script downloads Google's
depot_toolsearly on. (depot_toolsincludes a copy of theninjabinary.) I propose to add those to the PATH, so that runningninjalater in the script succeeds for users at home running this outside of CI.Background, context, more details:
The
make-v8.shscript (used by thetest-v8Makefile target) implicitly requires a separate copy ofninjaon the PATH, even though it bootstraps a copy ofninjafor you (that it proceeds to not use).This Pull Request adds the
_depot_toolsdir bootstrapped during this script to thePATH, beforeninjais executed, taking advantage of the fact that_depot_toolsconveniently includes a copy ofninja. This makes for one less system requirement to be able to finish thetest-v8Makefile target.(I am not sure why this script chooses to add
~/_depot_toolsto the PATH, as at least oiutside of CI on my personal machine, that directory never exists on my machine during the entiretest-v8Makefile target from beginning to end. But I interpret that as evidence thatdepot_toolsis already meant to be on the PATH in some form or other.)I was looking into documenting the system requirements needed to finish the
test-v8Makefile target. (I wanted to document that this is now the only part of this repository (that I know of) that still requires Python 2 after #36691, given that some Python scripts in the upstreamdepot_toolsandv8repositories still aren't Python 3 compatible).When I was testing that Makefile target locally, I noticed something a bit strange (to my eyes) about an implicit
ninjarequirement:test-v8Makefile target implicitly expectsninjaon the PATH in order to completetest-v8Makefile target ends up bootstrapping a copy ofdepot_toolsbefore that, atdeps/v8/_depot_toolsninja~/_depot_toolsis added to the PATH, but this isn't ensured to exist/isn't bootstrapped by thetest-v8Makefile targetdepot_toolsthere, but I left it in case CI needs it... It should now be fully redundant as of this PR, so I think the script could probably skip adding that location to thePATH. Unless CI needs a customdepot_toolsthere with modifications? It works for me locally with upstreamdepot_tools, so I can't think of why that would be needed.)deps/v8/_depot_toolswhich was just bootstrapped is not put on the PATHninja, and we went out of our way to get it, so I think we should take advantage.It feels like the bootstrapped
_depot_toolsis supposed to be on the PATH so we can use its copy ofninjato complete the rest of building V8. Rather than documenting this quirky and redundant (maybe accidental)
ninjarequirement, I thought I'd have a go at making it unnecessary to manually ensureninjais on the PATH, by using the copy that was just bootstrapped.An alternative might be simply directly executing the
deps/v8/_depot_tools/ninjabinary without altering the PATH whatsoever.But I haven't yet tested whether that works.Works for me, not sure whether it works just as well in CI.