(self)
| 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 |
nothing calls this directly
no test coverage detected