summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-07 18:45:16 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-07 18:45:16 +0300
commit5ec11f565b1999d0017fedd8efb61bbb5e5f59cd (patch)
treea458c6a3b76274e83e3ea6aac4d878ff871e0fb2
parent88153dc56a03938473fca8c0de46535f8ae3109b (diff)
downloadmicropython-5ec11f565b1999d0017fedd8efb61bbb5e5f59cd.tar.gz
micropython-5ec11f565b1999d0017fedd8efb61bbb5e5f59cd.zip
tests/run-tests: Factor out list supported external boards.
To get consistent error messages, etc.
-rwxr-xr-xtests/run-tests5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/run-tests b/tests/run-tests
index fd4063dc91..649f1789fa 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -351,14 +351,15 @@ def main():
cmd_parser.add_argument('files', nargs='*', help='input test files')
args = cmd_parser.parse_args()
- if args.target in ('pyboard', 'wipy', 'esp8266'):
+ EXTERNAL_TARGETS = ('pyboard', 'wipy', 'esp8266')
+ if args.target in EXTERNAL_TARGETS:
import pyboard
pyb = pyboard.Pyboard(args.device, args.baudrate, args.user, args.password)
pyb.enter_raw_repl()
elif args.target == 'unix':
pyb = None
else:
- raise ValueError('target must be either unix, pyboard or wipy')
+ raise ValueError('target must be either %s or unix' % ", ".join(EXTERNAL_TARGETS))
if len(args.files) == 0:
if args.test_dirs is None: