# HG changeset patch # User Windel Bouwman # Date 1395401610 -3600 # Node ID 68841f9ab96c54871476345ba9c23cc3c15ef2d3 # Parent 9c95f93f5b7ae3ee94f0b09b7249294b4b512596 Added yet another test snippet diff -r 9c95f93f5b7a -r 68841f9ab96c test/testemulation.py --- a/test/testemulation.py Fri Mar 21 12:01:19 2014 +0100 +++ b/test/testemulation.py Fri Mar 21 12:33:30 2014 +0100 @@ -33,12 +33,16 @@ qemu_serial_serve.listen(0) args = ['qemu-system-arm', '-M', machine, '-m', '16M', - '-nographic', '-kernel', kernel, '-monitor', - 'unix:qemucontrol.sock', - '-serial', 'unix:qemuserial.sock', '-S'] + '-nographic', + '-kernel', kernel, + '-monitor', 'unix:qemucontrol.sock', + '-serial', 'unix:qemuserial.sock', + '-S'] p = subprocess.Popen(args) - # Give process some time to boot: + #qemu_serial Give process some time to boot: + qemu_serial_serve.settimeout(3) + qemu_control_serve.settimeout(3) qemu_serial, address_peer = qemu_serial_serve.accept() qemu_control, address_peer = qemu_control_serve.accept() diff -r 9c95f93f5b7a -r 68841f9ab96c test/testsamples.py --- a/test/testsamples.py Fri Mar 21 12:01:19 2014 +0100 +++ b/test/testsamples.py Fri Mar 21 12:33:30 2014 +0100 @@ -42,6 +42,28 @@ res = "".join("A = 0x{0:08X}\n".format(a) for a in range(10)) self.do(snippet, res) + def testParameterPassing4(self): + snippet = """ + module sample; + import io; + function void dump(int a, int b, int c, int d) + { + io.print2("a=", a); + io.print2("b=", b); + io.print2("c=", c); + io.print2("d=", d); + } + function void start() + { + dump(4,55,66,0x1337); + } + """ + res = "a=0x{0:08X}\n".format(4) + res += "b=0x{0:08X}\n".format(55) + res += "c=0x{0:08X}\n".format(66) + res += "d=0x{0:08X}\n".format(0x1337) + self.do(snippet, res) + def testGlobalVariable(self): snippet = """ module sample;