Skip to content

Commit b5aa249

Browse files
scripts/sysinstall.py: add support for running under gdb.
1 parent 09b366f commit b5aa249

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/sysinstall.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
Args:
2222
23+
--gdb 0|1
2324
--mupdf-dir <mupdf_dir>
2425
Path of MuPDF checkout; default is 'mupdf'.
2526
--mupdf-do 0|1
@@ -134,6 +135,7 @@ def main():
134135

135136
# Set default behaviour.
136137
#
138+
gdb = False
137139
use_installer = True
138140
mupdf_do = True
139141
mupdf_dir = 'mupdf'
@@ -165,6 +167,7 @@ def main():
165167
if arg in ('-h', '--help'):
166168
log(__doc__)
167169
return
170+
elif arg == '--gdb': gdb = int(next(args))
168171
elif arg == '--mupdf-do': mupdf_do = int(next(args))
169172
elif arg == '--mupdf-dir': mupdf_dir = next(args)
170173
elif arg == '--mupdf-git': mupdf_git = next(args)
@@ -369,6 +372,8 @@ def run(command, env_extra=None):
369372
# 2024-03-20: Not sure whether/where `pymupdf` binary is installed, so we
370373
# disable the test_cli* tests.
371374
command += f' {pymupdf_dir}/scripts/test.py'
375+
if gdb:
376+
command += ' --gdb 1'
372377
command += f' -v 0'
373378
if pytest_name is None:
374379
excluded_tests = (

0 commit comments

Comments
 (0)