From a9a890964212019a79d2acf6225755a5c0fa149c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 18 Oct 2023 20:56:40 +0100 Subject: [PATCH] add test_caller_trap.py which stunningly actually works reasonably well (TrapTestCase has only previously been run on TestIssuer) --- src/openpower/decoder/isa/test_caller_trap.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/openpower/decoder/isa/test_caller_trap.py 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() -- 2.30.2