From 8713b0e12768461fd17c238cc9236e706e9b2c37 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 24 Jul 2020 13:59:29 +0100 Subject: [PATCH] fix how long div tests run, de-comment FSM and DivPipeCore --- src/soc/fu/div/test/test_all_pipe_caller.py | 12 ++++++++---- src/soc/fu/div/test/test_pipe_caller.py | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/soc/fu/div/test/test_all_pipe_caller.py b/src/soc/fu/div/test/test_all_pipe_caller.py index fead90ff..31bea464 100644 --- a/src/soc/fu/div/test/test_all_pipe_caller.py +++ b/src/soc/fu/div/test/test_all_pipe_caller.py @@ -7,9 +7,10 @@ from soc.fu.test.common import TestCase from soc.fu.div.test.runner import DivRunner -class DivTestCasesLong(unittest.TestCase): - def __init__(self): - self.test_data = [] +class DivTestLong(unittest.TestCase): + test_data = [] + def __init__(self, name): + super().__init__(name) for n, v in self.__class__.__dict__.items(): if n.startswith("test") and callable(v): self._current_test_name = n @@ -58,7 +59,10 @@ class DivTestCasesLong(unittest.TestCase): if __name__ == "__main__": unittest.main(exit=False) suite = unittest.TestSuite() - suite.addTest(DivRunner(DivTestCasesLong.test_data)) + suite.addTest(DivRunner(DivTestLong.test_data, DivPipeKind.DivPipeCore)) + suite.addTest(DivRunner(DivTestLong.test_data, DivPipeKind.FSMDivCore)) + suite.addTest(DivRunner(DivTestLong.test_data, DivPipeKind.SimOnly)) + runner = unittest.TextTestRunner() runner.run(suite) diff --git a/src/soc/fu/div/test/test_pipe_caller.py b/src/soc/fu/div/test/test_pipe_caller.py index 6d5c0345..573816ff 100644 --- a/src/soc/fu/div/test/test_pipe_caller.py +++ b/src/soc/fu/div/test/test_pipe_caller.py @@ -173,8 +173,8 @@ class DivTestCases(unittest.TestCase): if __name__ == "__main__": unittest.main(exit=False) suite = unittest.TestSuite() - #suite.addTest(DivRunner(DivTestCases.test_data, DivPipeKind.DivPipeCore)) - #suite.addTest(DivRunner(DivTestCases.test_data, DivPipeKind.FSMDivCore)) + suite.addTest(DivRunner(DivTestCases.test_data, DivPipeKind.DivPipeCore)) + suite.addTest(DivRunner(DivTestCases.test_data, DivPipeKind.FSMDivCore)) suite.addTest(DivRunner(DivTestCases.test_data, DivPipeKind.SimOnly)) runner = unittest.TextTestRunner() -- 2.30.2