Created
May 21, 2014 09:22
-
-
Save nscooling/679b35f5246662c6b242 to your computer and use it in GitHub Desktop.
Qucik and dirty python script to run Unity TDD on mbed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin = 'build\\tdd.bin' | |
disk = 'F:\\' | |
copy(bin, disk) | |
sleep(1.5) | |
serial = Serial('COM8', timeout = 1) | |
serial.flushInput() | |
serial.flushOutput() | |
serial.sendBreak() | |
while True: | |
c = serial.readline() | |
sys.stdout.write(c) | |
sys.stdout.flush() | |
if c.find('OK') != -1: | |
break | |
if c.find('FAIL') != -1: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment