aboutsummaryrefslogtreecommitdiff
path: root/tests/ebreak.py
blob: dd7e65878b7a9f19dc0e9634d7bb24c385fc8de7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/python

import os
import testlib
import unittest
import tempfile
import time

class EbreakTest(unittest.TestCase):
    def setUp(self):
        self.binary = testlib.compile("ebreak.s")

    def test_noport(self):
        """Make sure that we can run past ebreak when --gdb-port isn't used."""
        spike = testlib.Spike(self.binary, with_gdb=False, timeout=10)
        result = spike.wait()
        self.assertEqual(result, 0)

    def test_nogdb(self):
        """Make sure that we can run past ebreak when gdb isn't attached."""
        spike = testlib.Spike(self.binary, timeout=10)
        result = spike.wait()
        self.assertEqual(result, 0)

if __name__ == '__main__':
    unittest.main()