File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 55def GetConfiguration (context , root ):
66 # We don't use arch-specific out folder in Node.js; use none/none to auto
77 # detect release mode from GetVm and get the path to the executable.
8- vm = context .GetVm ('none' , 'none' )
8+ try :
9+ vm = context .GetVm ('none' , 'none' )
10+ except ValueError :
11+ # In debug only builds, we are getting an exception because none/none
12+ # results in taking the release flavor that is missing in that case. Try to
13+ # recover by using the first mode passed explicitly to the test.py.
14+ preferred_mode = getattr (context , 'default_mode' , 'none' ) or 'none'
15+ vm = context .GetVm ('none' , preferred_mode )
16+
917 if not os .path .isfile (vm ):
1018 return testpy .SimpleTestConfiguration (context , root , 'sea' )
1119
Original file line number Diff line number Diff line change @@ -1697,6 +1697,14 @@ def Main():
16971697 options .store_unexpected_output ,
16981698 options .repeat ,
16991699 options .abort_on_timeout )
1700+ # Remember the primary mode requested on the CLI so suites can reuse it when
1701+ # they need to probe for a binary outside of the normal test runner flow.
1702+ for requested_mode in options .mode :
1703+ if requested_mode :
1704+ context .default_mode = requested_mode
1705+ break
1706+ else :
1707+ context .default_mode = 'none'
17001708
17011709 if options .error_reporter :
17021710 context .use_error_reporter = True
You can’t perform that action at this time.
0 commit comments