From: R Veera Kumar Date: Sat, 23 Oct 2021 05:19:50 +0000 (+0530) Subject: Add a new test caller for ALU based on shift_rot test caller X-Git-Tag: sv_maxu_works-initial~777 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4495f61303afca9790a9e2c3bab4cf8977c7de11;p=openpower-isa.git Add a new test caller for ALU based on shift_rot test caller --- diff --git a/src/openpower/decoder/isa/test_caller_alu.py b/src/openpower/decoder/isa/test_caller_alu.py new file mode 100644 index 00000000..155d1a98 --- /dev/null +++ b/src/openpower/decoder/isa/test_caller_alu.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.alu.alu_cases import ALUTestCase + + +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 = ['alu'] + + unittest.main(exit=False) + suite = unittest.TestSuite() + + # dictionary of data for tests + tests = {'alu': ALUTestCase().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)