From c9328fcbaa57ef66be3b87270c831f4995db1dc4 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 17 Jan 2022 20:53:07 -0800 Subject: [PATCH] add test_caller_logical.py --- .../decoder/isa/test_caller_logical.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/openpower/decoder/isa/test_caller_logical.py diff --git a/src/openpower/decoder/isa/test_caller_logical.py b/src/openpower/decoder/isa/test_caller_logical.py new file mode 100644 index 00000000..eb3282b4 --- /dev/null +++ b/src/openpower/decoder/isa/test_caller_logical.py @@ -0,0 +1,38 @@ +""" Decoder tests + +related bugs: + + * +""" + +import unittest +import sys + +# These tests utilize the run_hdl=False parameter to compare +# simulator with expected states +from soc.simple.test.test_runner import TestRunner +from openpower.test.logical.logical_cases import LogicalTestCase + + +if __name__ == "__main__": + + # allow list of testing to be selected by command-line + testing = sys.argv[1:] + sys.argv = sys.argv[:1] + + if not testing: + testing = ['logical'] + + unittest.main(exit=False) + suite = unittest.TestSuite() + + # dictionary of data for tests + tests = {'logical': LogicalTestCase().test_data} + + # walk through all tests, those requested get added + for tname, data in tests.items(): + if tname in testing: + suite.addTest(TestRunner(data, run_hdl=False)) + + runner = unittest.TextTestRunner() + runner.run(suite) -- 2.30.2