Test ebreak without gdb.
[riscv-isa-sim.git] / tests / ebreak.py
1 #!/usr/bin/python
2
3 import os
4 import testlib
5 import unittest
6 import tempfile
7 import time
8
9 class EbreakTest(unittest.TestCase):
10 def setUp(self):
11 self.binary = testlib.compile("ebreak.s")
12
13 def test_ebreak(self):
14 """Make sure that we can run past ebreak without halting when a
15 debugger isn't attached."""
16 spike = testlib.spike(self.binary, with_gdb=False, timeout=10)
17 result = spike.wait()
18 self.assertEqual(result, 0)
19
20 if __name__ == '__main__':
21 unittest.main()