Add more tests for add and addi

This commit is contained in:
Johannes Maier
2024-01-13 13:46:09 +01:00
parent 50405ab89a
commit ab724721c0
2 changed files with 22 additions and 2 deletions

View File

@@ -37,8 +37,9 @@ def instr_r(opcode, reg1, reg2):
return bytes([opcode, reg1, 0, 0, reg2, 0, 0, 0])
def exec_program(program: bytes) -> int | None:
context.log_level = 'debug'
def exec_program(program: bytes, debug: bool = False) -> int | None:
if debug:
context.log_level = 'debug'
with remote("localhost", 1337, fam="ipv4") as p:
p.recvuntil(b"Password: ", timeout=1)
p.sendline(b"1234")