Skip to content

Commit 5ee4a03

Browse files
committed
[debuginfo-tests][Dexter] Fix some Windows-unfriendly Dexter behaviours
These are some minor things that I've run into on Windows, largely in error handling paths: * Giving --lldb-executable on Windows triggers a "useless option" code path, which touches an attribute that only exists in the list_debuggers tool. Switch this to use hasattr, which will work in all subtools. * We were over-decoding some text reporting errors, but only in an exception path * The path to lldb on Windows needs to be quoted (even though dexter isn't making use of it). Differential Revision: https://reviews.llvm.org/D74546
1 parent ff7b5ba commit 5ee4a03

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

debuginfo-tests/dexter/dex/debugger/Debuggers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _get_potential_debuggers(): # noqa
4141

4242

4343
def _warn_meaningless_option(context, option):
44-
if context.options.list_debuggers:
44+
if hasattr(context.options, 'list_debuggers'):
4545
return
4646

4747
warn(context,

debuginfo-tests/dexter/dex/tools/test/Tool.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __str__(self):
5858

5959
if self.error:
6060
script_error = (' : {}'.format(
61-
self.error.script_error.splitlines()[0].decode()) if getattr(
61+
self.error.script_error.splitlines()[0]) if getattr(
6262
self.error, 'script_error', None) else '')
6363

6464
error = ' [{}{}]'.format(

debuginfo-tests/lit.cfg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def get_required_attr(config, attr_name):
104104
'dexter', 'dexter.py')
105105
dexter_test_cmd = '"{}" "{}" test'.format(config.python3_executable, dexter_path)
106106
if lldb_path is not None:
107-
dexter_test_cmd += ' --lldb-executable {}'.format(lldb_path)
107+
dexter_test_cmd += ' --lldb-executable "{}"'.format(lldb_path)
108108
tools.append(ToolSubst('%dexter', dexter_test_cmd))
109109

110110
# For testing other bits of dexter that aren't under the "test" subcommand,

0 commit comments

Comments
 (0)