1)), ("Single-cycle CPU memory test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-mem.circ'), os.path.join(file_locations, 'output/CPU-mem.out'), os.path.join(file_locations, 'reference_output/CPU-mem.out'), 1)), ("Single-cycle CPU branch test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-branch.circ'), os.path.join(file_locations, 'output/CPU-branch.out'), os.path.join(file_locations, 'reference_output/CPU-branch.out'), 1)), ("Single-cycle CPU jump test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-jump.circ'), os.path.join(file_locations, 'output/CPU-jump.out'), os.path.join(file_locations, 'reference_output/CPU-jump.out'), 1)), ("Single-cycle CPU swge test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-swge.circ'), os.path.join(file_locations, 'output/CPU-swge.out'), os.path.join(file_locations, 'reference_output/CPU-swge.out'), 1)), ("Single-cycle CPU br_jalr test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-br_jalr.circ'), os.path.join(file_locations, 'output/CPU-br_jalr.out'), os.path.join(file_locations, 'reference_output/CPU-br_jalr.out'), 1)) ] if __name__ == '__main__': main(tests)
#!/usr/bin/env python import autograder_base import os.path from autograder_base import file_locations, AbsoluteTestCase, FractionalTestCase, main tests = [ ("CPU add test",AbsoluteTestCase(os.path.join(file_locations,'CPU-add.circ'),os.path.join(file_locations,'out-files/CPU-add.out'),1)), ("CPU addiu test",AbsoluteTestCase(os.path.join(file_locations,'CPU-addiu.circ'),os.path.join(file_locations,'out-files/CPU-addiu.out'),1)), ("CPU lui test",AbsoluteTestCase(os.path.join(file_locations,'CPU-lui.circ'),os.path.join(file_locations,'out-files/CPU-lui.out'),1)), ("CPU ori test",AbsoluteTestCase(os.path.join(file_locations,'CPU-ori.circ'),os.path.join(file_locations,'out-files/CPU-ori.out'),1)), ("CPU slt test",AbsoluteTestCase(os.path.join(file_locations,'CPU-slt.circ'),os.path.join(file_locations,'out-files/CPU-slt.out'),1)), ] if __name__ == '__main__': main(tests)
#!/usr/bin/env python import autograder_base import os.path from autograder_base import file_locations, AbsoluteTestCase, main sanity_tests = [("CPU add/lui/sll test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-add_lui_sll.circ'), os.path.join(file_locations, 'reference_output/CPU-add_lui_sll.out'), 1)), ("CPU memory test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-mem.circ'), os.path.join(file_locations, 'reference_output/CPU-mem.out'), 1)), ("CPU branch test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-branch.circ'), os.path.join(file_locations, 'reference_output/CPU-branch.out'), 1)), ("CPU jump test", AbsoluteTestCase( os.path.join(file_locations, 'CPU-jump.circ'), os.path.join(file_locations, 'reference_output/CPU-jump.out'), 1))] if __name__ == '__main__': main(sanity_tests)