Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / gdb / kill.py
1 # -*- python -*-
2 # Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import gdb_test
7
8
9 class KillTest(gdb_test.GdbTest):
10
11   def test_kill(self):
12     # Test that you can stop on a breakpoint, then kill the program being
13     # debugged.
14     self.gdb.Command('break test_kill')
15     self.gdb.ResumeAndExpectStop('continue', 'breakpoint-hit')
16     self.gdb.Kill()
17
18   def tearDown(self):
19     # Test program should end first with the kill return code.
20     # Intentionally bypass superclass's tearDown as it assumes gdb exits first.
21     self.AssertSelLdrExits()
22     self.gdb.Quit()
23     self.gdb.Wait()
24
25
26 if __name__ == '__main__':
27   gdb_test.Main()