if __name__ == "__main__":
svp64 = True
- if sys.argv[1] == 'nosvp64':
+ if len(sys.argv) > 1 and sys.argv[1] == 'nosvp64':
svp64 = False
del sys.argv[1]
# detect overlap case
allow_overlap = False
- if sys.argv[1] == '--allow-overlap':
+ if len(sys.argv) >= 2 and sys.argv[1] == '--allow-overlap':
allow_overlap = True
del sys.argv[1]
+ # use in-order issuer, instead of the original FSM based one
+ inorder = False
+ if len(sys.argv) >= 2 and sys.argv[1] == '--inorder':
+ inorder = True
+ del sys.argv[1]
+
# allow list of testing to be selected by command-line
- testing = sys.argv[1:]
- sys.argv = sys.argv[:1]
+ testing = []
+ for i in reversed(range(1, len(sys.argv))):
+ if not sys.argv[i].startswith('-'):
+ testing.append(sys.argv.pop(i))
if not testing:
testing = ['general', 'ldst', 'cr', 'shiftrot', 'shiftrot2',
'logical', 'alu',
'branch', 'div', 'mul', 'hazard']
- print ("SVP64 test mode enabled", svp64, "overlap",
- allow_overlap, "testing", testing)
+ print("SVP64 test mode enabled", svp64, "overlap",
+ allow_overlap, "in-order", inorder, "testing", testing)
unittest.main(exit=False)
suite = unittest.TestSuite()
'alu': ALUTestCase().test_data,
'branch': BranchTestCase().test_data,
'spr': SPRTestCase().test_data
- }
+ }
# walk through all tests, those requested get added
for tname, data in tests.items():
if tname in testing:
- suite.addTest(TestRunner(data, svp64=svp64,
+ suite.addTest(TestRunner(data, svp64=svp64, inorder=inorder,
allow_overlap=allow_overlap))
runner = unittest.TextTestRunner()