Shorten the debug tests
authorPalmer Dabbelt <palmer@dabbelt.com>
Wed, 17 May 2017 17:50:55 +0000 (10:50 -0700)
committerPalmer Dabbelt <palmer@dabbelt.com>
Wed, 17 May 2017 17:51:09 +0000 (10:51 -0700)
debug/gdbserver.py

index dbc37fc222958dd2c6331b94a0b5a0de0ffc8d6d..476e51d876c48b46ce43b6ac4cd75d0a7d5bc2a7 100755 (executable)
@@ -275,7 +275,7 @@ class DebugTurbostep(DebugTest):
         last_pc = None
         advances = 0
         jumps = 0
-        for _ in range(100):
+        for _ in range(10):
             self.gdb.stepi()
             pc = self.gdb.p("$pc")
             assertNotEqual(last_pc, pc)
@@ -286,8 +286,8 @@ class DebugTurbostep(DebugTest):
             last_pc = pc
         # Some basic sanity that we're not running between breakpoints or
         # something.
-        assertGreater(jumps, 10)
-        assertGreater(advances, 50)
+        assertGreater(jumps, 1)
+        assertGreater(advances, 5)
 
 class DebugExit(DebugTest):
     def test(self):
@@ -578,7 +578,7 @@ class WriteCsrs(RegsTest):
 class DownloadTest(GdbTest):
     def setup(self):
         # pylint: disable=attribute-defined-outside-init
-        length = min(2**20, self.target.ram_size - 2048)
+        length = min(2**10, self.target.ram_size - 2048)
         self.download_c = tempfile.NamedTemporaryFile(prefix="download_",
                 suffix=".c", delete=False)
         self.download_c.write("#include <stdint.h>\n")