diff options
author | Daniel Campora <daniel@wipy.io> | 2015-06-28 14:01:27 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-07-26 14:02:34 +0100 |
commit | cd14188bc8b4cd942ea7ea5cf5eb27955d8695ae (patch) | |
tree | 2fff73a45466f0b5937c6d270a45be2171a6a1ca /tests | |
parent | db109ca0fc12f4a8ffe08d44d3b1422452bd7b4e (diff) | |
download | micropython-cd14188bc8b4cd942ea7ea5cf5eb27955d8695ae.tar.gz micropython-cd14188bc8b4cd942ea7ea5cf5eb27955d8695ae.zip |
tools: Add telnet support to pyboard.py.
The adapter class "TelnetToSerial" is used to access the Telnet
connection using the same API as with the serial connection. The
function pyboard.run-test() has been removed to made the module
generic and because this small test is no longer needed.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run-tests | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/run-tests b/tests/run-tests index bd2cbfd029..b4baff2b83 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -266,17 +266,19 @@ def run_tests(pyb, tests, args): def main(): cmd_parser = argparse.ArgumentParser(description='Run tests for Micro Python.') cmd_parser.add_argument('--target', default='unix', help='the target platform') - cmd_parser.add_argument('--device', default='/dev/ttyACM0', help='the serial device of the target board') + cmd_parser.add_argument('--device', default='/dev/ttyACM0', help='the serial device or the IP address of the pyboard') + cmd_parser.add_argument('-b', '--baudrate', default=115200, help='the baud rate of the serial device') + cmd_parser.add_argument('-u', '--user', default='micro', help='the telnet login username') + cmd_parser.add_argument('-p', '--password', default='python', help='the telnet login password') cmd_parser.add_argument('-d', '--test-dirs', nargs='*', help='input test directories (if no files given)') cmd_parser.add_argument('--write-exp', action='store_true', help='save .exp files to run tests w/o CPython') cmd_parser.add_argument('--emit', default='bytecode', help='Micro Python emitter to use (bytecode or native)') - cmd_parser.add_argument('-b', '--baudrate', default=115200, help='the baud rate of the serial device') cmd_parser.add_argument('files', nargs='*', help='input test files') args = cmd_parser.parse_args() if args.target == 'pyboard' or args.target == 'wipy': import pyboard - pyb = pyboard.Pyboard(args.device, args.baudrate) + pyb = pyboard.Pyboard(args.device, args.baudrate, args.user, args.password) pyb.enter_raw_repl() elif args.target == 'unix': pyb = None |