Skip to content

Commit b879c1e

Browse files
hashseedBridgeAR
authored andcommitted
tools: fix test.py --shell
This fixes the necessary plumbing to make the --shell argument have its intended effect. PR-URL: #26449 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent b2e27a0 commit b879c1e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎tools/test.py‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -918,12 +918,12 @@ def GetTestStatus(self, context, sections, defs):
918918

919919
classContext(object):
920920

921-
def__init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
921+
def__init__(self, workspace, verbose, vm, args, expect_fail,
922922
timeout, processor, suppress_dialogs,
923923
store_unexpected_output, repeat, abort_on_timeout):
924924
self.workspace=workspace
925-
self.buildspace=buildspace
926925
self.verbose=verbose
926+
self.vm=vm
927927
self.node_args=args
928928
self.expect_fail=expect_fail
929929
self.timeout=timeout
@@ -936,6 +936,8 @@ def __init__(self, workspace, buildspace, verbose, vm, args, expect_fail,
936936
self.node_has_crypto=True
937937

938938
defGetVm(self, arch, mode):
939+
ifself.vmisnotNone:
940+
returnself.vm
939941
ifarch=='none':
940942
name='out/Debug/node'ifmode=='debug'else'out/Release/node'
941943
else:
@@ -1381,7 +1383,7 @@ def BuildOptions():
13811383
dest="suppress_dialogs", default=True, action="store_true")
13821384
result.add_option("--no-suppress-dialogs", help="Display Windows dialogs for crashing tests",
13831385
dest="suppress_dialogs", action="store_false")
1384-
result.add_option("--shell", help="Path to V8 shell", default="shell")
1386+
result.add_option("--shell", help="Path to node executable", default=None)
13851387
result.add_option("--store-unexpected-output",
13861388
help="Store the temporary JS files from tests that fails",
13871389
dest="store_unexpected_output", default=True, action="store_true")
@@ -1605,14 +1607,11 @@ def Main():
16051607
run_worker=join(workspace, "tools", "run-worker.js")
16061608
options.node_args.append(run_worker)
16071609

1608-
shell=abspath(options.shell)
1609-
buildspace=dirname(shell)
1610-
16111610
processor=GetSpecialCommandProcessor(options.special_command)
1611+
16121612
context=Context(workspace,
1613-
buildspace,
16141613
VERBOSE,
1615-
shell,
1614+
options.shell,
16161615
options.node_args,
16171616
options.expect_fail,
16181617
options.timeout,

0 commit comments

Comments
 (0)