Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: scripts/slave/unittests/expect_tests/handle_debug.py

Issue 220353003: Replace recipes_test.py with a new parallel expectation-based test runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fix coverage race Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import sys
6 import pdb
7
8 from .type_definitions import Handler
9
10
11 class DebugHandler(Handler):
12 """Execute each test under the pdb debugger."""
13 SKIP_RUNLOOP = True
14
15 class ResultStageHandler(Handler.ResultStageHandler):
16 @staticmethod
17 def handle_Test(test):
18 dbg = pdb.Pdb()
19 for path, line, funcname in test.breakpoints:
20 dbg.set_break(path, line, funcname=funcname)
21
22 dbg.reset()
23
24 def dispatch_thunk(*args):
25 """Allows us to continue until the actual breakpoint."""
26 val = dbg.trace_dispatch(*args)
27 dbg.set_continue()
28 sys.settrace(dbg.trace_dispatch)
29 return val
30 sys.settrace(dispatch_thunk)
31 try:
32 test.run()
33 except pdb.bdb.BdbQuit:
34 pass
35 finally:
36 dbg.quitting = 1
37 sys.settrace(None)
OLDNEW
« no previous file with comments | « scripts/slave/unittests/expect_tests/cover.py ('k') | scripts/slave/unittests/expect_tests/handle_list.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698