-
Notifications
You must be signed in to change notification settings - Fork 30k
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: tests fails on Windows with spaces in paths #12773
Comments
cc @nodejs/platform-windows |
Ref: #12084 |
@refack This issue is about our tests, so it should actually be fixable. |
Ok. I'm going to dig in @vsemozhetbyt is it only a Windows issue? |
@addaleax @refack I can't test on other OSs. I shall try to fix this though, step by step, using this as a tracking issue. This bothered me while I have been making a big churn for tests (like #12735) trying to test a test after each fix with my editor automation that calls |
@refack I think we may better fix this without changing |
P.S. Break it down into a few PRs 😉 |
@refack If I detect this sensitivity from the |
I can't even build node on Linux if there are spaces in the path. I tried checking node out as "space node", but build failed. So I tried again, checking it out as
I'm not convinced that having some restrictions on the paths that you do node development in is a bad thing. On the other hand, if some enterprising folks want to fix the build system to allow that, that's great. |
@sam-github I think while Node.js is installed in the |
Permit spaces in paths to a Node.js executable and test scripts. PR-URL: nodejs#12972 Fixes: nodejs#12773 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Permit spaces in paths to a Node.js executable and test scripts. PR-URL: #12972 Fixes: #12773 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Permit spaces in paths to a Node.js executable and test scripts. PR-URL: #12972 Fixes: #12773 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
CONTRIBUTING.md
states:Though this example shows specific command, a user may assume that tests can be launched with a
node
in any path, as well as the tests themselves can be placed in a folder with any path.This is mostly true. However, there are some tests that fail if a space character exists in any of these paths, even if the command elements are enclosed in quotes.
I've tried to find these tests, however, this list may be not complete.
It seems these cases better be fixed to ease quick tests verification during various editing.
And what is more, a user can clone the repository in the folder with spaces in path and test run will be compromised: in this case both the tests and the executable (in
Release
folder) will contain spaces in parent paths.1. Tests fail with spaces in
node.exe
path. You can use either an absolute path tonode.exe
(as in the examples below) or justnode
(if thePATH
resolves this to the absolute path with spaces — which is the default behavior on Windows). Parent test folders do not contain spaces (you can use either absolute paths outside or relative ones inside the repo folder).the list with test commands:
2. Tests fail with spaces in test path. Use an absolute path to
node.exe
without spaces and path to tests with spaces (or just run this with relative tests paths inside repo folder with spaces in parent path).the list with test commands:
3. Tests fail with spaces in node.exe OR test path (either variant with the same tests fail).
the list with test commands:
4. Tests fail with spaces in node.exe AND test path (both paths should contain spaces to fail).
the list with test commands:
"j:/temp/node master/Release/node.exe" "j:/temp/node master/test/parallel/test-spawn-cmd-named-pipe.js"
The text was updated successfully, but these errors were encountered: