tests/run-tests: Introduce generic "minimal" target.

Used e.g. by Zephyr port.
This commit is contained in:
Paul Sokolovsky 2017-04-03 10:20:41 +03:00
parent 7df4558df8
commit 831e157226

View File

@ -290,6 +290,9 @@ def run_tests(pyb, tests, args):
skip_tests.add('float/bytes_construct.py') # requires fp32 skip_tests.add('float/bytes_construct.py') # requires fp32
skip_tests.add('float/bytearray_construct.py') # requires fp32 skip_tests.add('float/bytearray_construct.py') # requires fp32
skip_tests.add('misc/rge_sm.py') # too large skip_tests.add('misc/rge_sm.py') # too large
elif args.target == 'minimal':
skip_tests.add('misc/rge_sm.py') # too large
skip_tests.add('micropython/opt_level.py') # don't assume line numbers are stored
# Some tests are known to fail on 64-bit machines # Some tests are known to fail on 64-bit machines
if pyb is None and platform.architecture()[0] == '64bit': if pyb is None and platform.architecture()[0] == '64bit':
@ -429,7 +432,7 @@ def main():
cmd_parser.add_argument('files', nargs='*', help='input test files') cmd_parser.add_argument('files', nargs='*', help='input test files')
args = cmd_parser.parse_args() args = cmd_parser.parse_args()
EXTERNAL_TARGETS = ('pyboard', 'wipy', 'esp8266') EXTERNAL_TARGETS = ('pyboard', 'wipy', 'esp8266', 'minimal')
if args.target in EXTERNAL_TARGETS: if args.target in EXTERNAL_TARGETS:
import pyboard import pyboard
pyb = pyboard.Pyboard(args.device, args.baudrate, args.user, args.password) pyb = pyboard.Pyboard(args.device, args.baudrate, args.user, args.password)
@ -444,7 +447,7 @@ def main():
if args.target == 'pyboard': if args.target == 'pyboard':
# run pyboard tests # run pyboard tests
test_dirs = ('basics', 'micropython', 'float', 'misc', 'stress', 'extmod', 'pyb', 'pybnative', 'inlineasm') test_dirs = ('basics', 'micropython', 'float', 'misc', 'stress', 'extmod', 'pyb', 'pybnative', 'inlineasm')
elif args.target == 'esp8266': elif args.target in ('esp8266', 'minimal'):
test_dirs = ('basics', 'micropython', 'float', 'misc', 'extmod') test_dirs = ('basics', 'micropython', 'float', 'misc', 'extmod')
elif args.target == 'wipy': elif args.target == 'wipy':
# run WiPy tests # run WiPy tests