From: klehman Date: Fri, 24 Sep 2021 13:59:27 +0000 (-0400) Subject: decoder test_issuer X-Git-Tag: sv_maxu_works-initial~838 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51aed07f97bf80e4ec0f556ea43973ca597a172b;p=openpower-isa.git decoder test_issuer --- diff --git a/src/openpower/decoder/isa/test_issuer.py b/src/openpower/decoder/isa/test_issuer.py new file mode 100644 index 00000000..09b67333 --- /dev/null +++ b/src/openpower/decoder/isa/test_issuer.py @@ -0,0 +1,37 @@ +""" 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.decoder.isa.shift_rot_cases import ShiftRotTestCase + + +if __name__ == "__main__": + + # allow list of testing to be selected by command-line + testing = sys.argv[1:] + + if not testing: + testing = ['shiftrot'] + + unittest.main(exit=False) + suite = unittest.TestSuite() + + # dictionary of data for tests + tests = {'shiftrot': ShiftRotTestCase().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)