aboutsummaryrefslogtreecommitdiff
path: root/tests/ebreak.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ebreak.py')
-rwxr-xr-xtests/ebreak.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ebreak.py b/tests/ebreak.py
new file mode 100755
index 0000000..6c3ffdb
--- /dev/null
+++ b/tests/ebreak.py
@@ -0,0 +1,21 @@
+#!/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_ebreak(self):
+ """Make sure that we can run past ebreak without halting when a
+ debugger isn't attached."""
+ spike = testlib.spike(self.binary, with_gdb=False, timeout=10)
+ result = spike.wait()
+ self.assertEqual(result, 0)
+
+if __name__ == '__main__':
+ unittest.main()