From: Luke Kenneth Casson Leighton Date: Wed, 18 Oct 2023 19:56:40 +0000 (+0100) Subject: add test_caller_trap.py which stunningly actually works reasonably well X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7fcdf02b6fce5459f655924e7b177108c97d2450;p=openpower-isa.git add test_caller_trap.py which stunningly actually works reasonably well (TrapTestCase has only previously been run on TestIssuer) --- diff --git a/src/openpower/decoder/isa/test_caller_trap.py b/src/openpower/decoder/isa/test_caller_trap.py new file mode 100644 index 00000000..6d459c4d --- /dev/null +++ b/src/openpower/decoder/isa/test_caller_trap.py @@ -0,0 +1,27 @@ +"""Trap tests + +related bugs: + + * https://bugs.libre-soc.org/show_bug.cgi?id=982 +""" + +import unittest + +from openpower.test.trap.trap_cases import TrapTestCase +from openpower.test.runner import TestRunnerBase + +# writing the test_caller invocation this way makes it work with pytest + + +class TrapTest(TestRunnerBase): + def __init__(self, test): + assert test == 'test' + super().__init__(TrapTestCase().test_data) + + def test(self): + # dummy function to make unittest try to test this class + pass + + +if __name__ == "__main__": + unittest.main()