"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.alu.alu_cases import ALUTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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']
+class TestALU(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(ALUTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # 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(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.bitmanip.bitmanip_cases import BitManipTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['bitmanip']
+class TestBitManip(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(BitManipTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'bitmanip': BitManipTestCase().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.bitmanip.av_cases import AVTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['bitmanipav']
+class TestAV(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(AVTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'bitmanipav': AVTestCase().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.alu.fmvis_cases import FMVISTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['fmvis', 'fishmv']
+class TestFMVIS(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(FMVISTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'fmvis': FMVISTestCase().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.logical.logical_cases import LogicalTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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']
+class TestLogical(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(LogicalTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # 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(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.mul.mul_cases import MulTestCases2Arg
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['mul2']
+class TestMul2Arg(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(MulTestCases2Arg().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'mul2': MulTestCases2Arg().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.shift_rot.shift_rot_cases2 import ShiftRotTestCase2
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['shiftrot2']
+class TestShiftRot2(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(ShiftRotTestCase2().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'shiftrot2': ShiftRotTestCase2().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.alu.svp64_cases import SVP64ALUTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['svp64_alu']
+class TestSVP64ALU(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(SVP64ALUTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'svp64_alu': SVP64ALUTestCase().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
"""
import unittest
-import sys
-
-# These tests utilize the run_hdl=False parameter to compare
-# simulator with expected states
from openpower.test.runner import TestRunnerBase
from openpower.test.logical.svp64_cases import SVP64LogicalTestCase
+# writing the test_caller invocation this way makes it work with pytest
-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 = ['svp64_logical']
+class TestSVP64Logical(TestRunnerBase):
+ def __init__(self, test):
+ assert test == 'test'
+ super().__init__(SVP64LogicalTestCase().test_data)
- unittest.main(exit=False)
- suite = unittest.TestSuite()
+ def test(self):
+ # dummy function to make unittest try to test this class
+ pass
- # dictionary of data for tests
- tests = {'svp64_logical': SVP64LogicalTestCase().test_data}
- # walk through all tests, those requested get added
- for tname, data in tests.items():
- if tname in testing:
- suite.addTest(TestRunnerBase(data))
-
- runner = unittest.TextTestRunner()
- runner.run(suite)
+if __name__ == "__main__":
+ unittest.main()
# writing the test_caller invocation this way makes it work with pytest
+
class TestSVP64UTF8Validation(TestRunnerBase):
def __init__(self, test):
assert test == 'test'