| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,15 @@ | |||
| 5 | 5 | def GetConfiguration(context, root): | |
| 6 | 6 | # We don't use arch-specific out folder in Node.js; use none/none to auto | |
| 7 | 7 | # 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 | + | ||
| 9 | 17 | if not os.path.isfile(vm): | |
| 10 | 18 | return testpy.SimpleTestConfiguration(context, root, 'sea') | |
| 11 | 19 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1697,6 +1697,14 @@ def Main(): | |||
| 1697 | 1697 | options.store_unexpected_output, | |
| 1698 | 1698 | options.repeat, | |
| 1699 | 1699 | 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' | ||
| 1700 | 1708 | ||
| 1701 | 1709 | if options.error_reporter: | |
| 1702 | 1710 | context.use_error_reporter = True | |
| Back | FazBrowse Home | New Git URL |
0 commit comments