summaryrefslogtreecommitdiffstatshomepage
path: root/tests/run-multitests.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-30 10:12:04 +1000
committerDamien George <damien@micropython.org>2021-04-30 15:47:22 +1000
commit76dab3bf31617e707a874a6c0dfc49af97640980 (patch)
tree747ff73d6416edabf0a476ed7b882c7865bd3a61 /tests/run-multitests.py
parent888664130c6605f333a6901e821589dee43f6ebb (diff)
downloadmicropython-76dab3bf31617e707a874a6c0dfc49af97640980.tar.gz
micropython-76dab3bf31617e707a874a6c0dfc49af97640980.zip
tests/run-multitests.py: Provide some convenient serial device shorcuts.
It's now possible to specify a device serial port using shorcuts like: $ ./run-multitests.py -i pyb:a0 -i pyb:u1 multi_bluetooth/*.py Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/run-multitests.py')
-rwxr-xr-xtests/run-multitests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-multitests.py b/tests/run-multitests.py
index cdb2730eda..3163a48e63 100755
--- a/tests/run-multitests.py
+++ b/tests/run-multitests.py
@@ -160,7 +160,17 @@ class PyInstanceSubProcess(PyInstance):
class PyInstancePyboard(PyInstance):
+ @staticmethod
+ def map_device_shortcut(device):
+ if device[0] == "a" and device[1:].isdigit():
+ return "/dev/ttyACM" + device[1:]
+ elif device[0] == "u" and device[1:].isdigit():
+ return "/dev/ttyUSB" + device[1:]
+ else:
+ return device
+
def __init__(self, device):
+ device = self.map_device_shortcut(device)
self.device = device
self.pyb = pyboard.Pyboard(device)
self.pyb.enter_raw_repl()