MCPcopy Create free account
hub / github.com/Vector35/debugger / test_repeated_use

Method test_repeated_use

test/debugger_test.py:53–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.arch = ''
52
53 def test_repeated_use(self):
54 fpath = name_to_fpath('helloworld', self.arch)
55 bv = load(fpath)
56
57 def run_once():
58 dbg = DebuggerController(bv)
59 dbg.cmd_line = 'foobar'
60 self.assertNotIn(dbg.launch_and_wait(), [DebugStopReason.ProcessExited, DebugStopReason.InternalError])
61
62 # continue execution to the entry point, and check the stop reason
63 reason = dbg.step_into_and_wait()
64 self.assertEqual(reason, DebugStopReason.SingleStep)
65 reason = dbg.step_into_and_wait()
66 self.assertEqual(reason, DebugStopReason.SingleStep)
67 reason = dbg.step_into_and_wait()
68 self.assertEqual(reason, DebugStopReason.SingleStep)
69 # go until executing done
70 reason = dbg.go_and_wait()
71 self.assertEqual(reason, DebugStopReason.ProcessExited)
72
73 # Do the same thing for 10 times
74 n = 10
75 for i in range(n):
76 run_once()
77
78 def test_return_code(self):
79 # return code tests

Callers

nothing calls this directly

Calls 1

name_to_fpathFunction · 0.85

Tested by

no test coverage detected