-
-
Notifications
You must be signed in to change notification settings - Fork 32k
test: add the ability to run the tests from node in the path #9674
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
Conversation
hmmm.. LGTM I suppose. @nodejs/build |
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, this would definitely be useful for manually running tests.
@GeorgeAdams95 what would be the purpose of this? It would seem odd to me to run tests that are different than the tests shipped with a particular binary |
@thealphanerd this would be useful for manually re-running tests, means that rather than having to build node you could just use nvm for example |
This pr adds the ability to run `tools/test.py --path`. This means that instead of defaulting to out/Release we can use the node version from the path.
CI is green, any objections to this? |
No objections |
This pr adds the ability to run `tools/test.py --path`. This means that instead of defaulting to out/Release we can use the node version from the path. PR-URL: #9674 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 4198253 |
Added don't land on v7.x for now. I keep getting errors when running tests now:
We should probably revert until those can be addressed. |
Something like this, could fix the problem I think. # Pastebin 2d5uLHb4
diff --git a/tools/test.py b/tools/test.py
index 18188e7b00..f553122ad5 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -852,7 +852,7 @@ class Context(object):
def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
timeout, processor, suppress_dialogs,
- store_unexpected_output, repeat):
+ store_unexpected_output, repeat, path):
self.workspace = workspace
self.buildspace = buildspace
self.verbose = verbose
@@ -864,16 +864,11 @@ class Context(object):
self.suppress_dialogs = suppress_dialogs
self.store_unexpected_output = store_unexpected_output
self.repeat = repeat
+ self.path = path
def GetVm(self, arch, mode):
- parser = BuildOptions()
- (options, args) = parser.parse_args()
- if not ProcessOptions(options):
- parser.print_help()
- return 1
- if options.path:
- name = find_executable("node")
- return name
+ if self.path:
+ return find_executable("node")
if arch == 'none':
name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
else:
@@ -1577,7 +1572,8 @@ def Main():
processor,
options.suppress_dialogs,
options.store_unexpected_output,
- options.repeat)
+ options.repeat,
+ options.path)
|
Okay, so this happens when using Sorry for missing this in the review! |
This pr adds the ability to run `tools/test.py --path`. This means that instead of defaulting to out/Release we can use the node version from the path. PR-URL: nodejs#9674 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test
Description of change
This pr adds the ability to run
tools/test.py --path
. This means that instead of defaulting to out/Release we can use the node version from the path.