summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-05-06 15:31:54 (GMT)
committerMats Wichmann <mats@linux.com>2021-05-06 15:38:16 (GMT)
commit1801220fb3d89da579c037208f058becf96125d8 (patch)
treece00ff842fe258ee3d9c593457e4a10321fb3f19 /runtest.py
parentf046cf47ded412a0b96edb560ed7bb2daf72ccfb (diff)
downloadSCons-1801220fb3d89da579c037208f058becf96125d8.zip
SCons-1801220fb3d89da579c037208f058becf96125d8.tar.gz
SCons-1801220fb3d89da579c037208f058becf96125d8.tar.bz2
Fix (and simplify) starting tests in debugger [ci skip]
A mis-indented break statement caused the "-d" option to runtest.py to start a test in the debugger to be inoperative. It's not necessary to search for the path to the debugger module, so this can be simplified to just supply "-m pdb". Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'runtest.py')
-rwxr-xr-xruntest.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtest.py b/runtest.py
index 9e7cb2c..69b3a61 100755
--- a/runtest.py
+++ b/runtest.py
@@ -199,11 +199,8 @@ if args.short_progress:
suppress_output = catch_output = True
if args.debug:
- for d in sys.path:
- pdb = os.path.join(d, 'pdb.py')
- if os.path.exists(pdb):
- debug = pdb
- break
+ # TODO: add a way to pass a specific debugger
+ debug = "pdb"
if args.exec:
scons = args.exec
@@ -710,7 +707,7 @@ def run_test(t, io_lock=None, run_async=True):
t.headline = ""
command_args = []
if debug:
- command_args.append(debug)
+ command_args.extend(['-m', debug])
if args.devmode and sys.version_info >= (3, 7, 0):
command_args.append('-X dev')
command_args.append(t.path)