Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion test/sea/testcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
def GetConfiguration(context, root):
# We don't use arch-specific out folder in Node.js; use none/none to auto
# detect release mode from GetVm and get the path to the executable.
vm = context.GetVm('none', 'none')
try:
vm = context.GetVm('none', 'none')
except ValueError:
# In debug only builds, we are getting an exception because none/none
# results in taking the release flavor that is missing in that case. Try to
# recover by using the first mode passed explicitly to the test.py.
preferred_mode = getattr(context, 'default_mode', 'none') or 'none'
vm = context.GetVm('none', preferred_mode)

if not os.path.isfile(vm):
return testpy.SimpleTestConfiguration(context, root, 'sea')

Expand Down
8 changes: 8 additions & 0 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,14 @@ def Main():
options.store_unexpected_output,
options.repeat,
options.abort_on_timeout)
# Remember the primary mode requested on the CLI so suites can reuse it when
# they need to probe for a binary outside of the normal test runner flow.
for requested_mode in options.mode:
if requested_mode:
context.default_mode = requested_mode
break
else:
context.default_mode = 'none'

if options.error_reporter:
context.use_error_reporter = True
Expand Down
Loading