Skip to content

Commit a3fe307

Browse files
committed
tests: Consolidate all feature check snippets under feature_check/.
1 parent 1a1b48e commit a3fe307

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed

tests/feature_check/native_check.py.exp

Whitespace-only changes.
File renamed without changes.

tests/run-tests

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def rm_f(fname):
2929
def run_micropython(pyb, args, test_file):
3030
if pyb is None:
3131
# run on PC
32-
if test_file.startswith('cmdline/') or test_file == 'micropython/meminfo.py':
32+
if test_file.startswith(('cmdline/', 'feature_check/')) or test_file == 'micropython/meminfo.py':
3333
# special handling for tests of the unix cmdline program
3434

3535
# check for any cmdline options needed for this test
@@ -42,7 +42,7 @@ def run_micropython(pyb, args, test_file):
4242

4343
# run the test, possibly with redirected input
4444
try:
45-
if test_file.startswith('cmdline/repl_'):
45+
if 'repl_' in test_file:
4646
# Need to use a PTY to test command line editing
4747
try:
4848
import pty
@@ -164,18 +164,17 @@ def run_tests(pyb, tests, args):
164164
skip_native = False
165165

166166
# Check if micropython.native is supported, and skip such tests if it's not
167-
native = run_micropython(pyb, args, 'micropython/native_check.py')
167+
native = run_micropython(pyb, args, 'feature_check/native_check.py')
168168
if native == b'CRASH':
169169
skip_native = True
170170

171171
# Check if emacs repl is supported, and skip such tests if it's not
172-
t = run_micropython(pyb, args, 'cmdline/repl_emacs_check.py')
172+
t = run_micropython(pyb, args, 'feature_check/repl_emacs_check.py')
173173
if not 'True' in str(t, 'ascii'):
174-
skip_tests.add('cmdline/repl_emacs_check.py')
175174
skip_tests.add('cmdline/repl_emacs_keys.py')
176175

177-
upy_byteorder = run_micropython(pyb, args, 'byteorder.py')
178-
cpy_byteorder = subprocess.check_output([CPYTHON3, 'byteorder.py'])
176+
upy_byteorder = run_micropython(pyb, args, 'feature_check/byteorder.py')
177+
cpy_byteorder = subprocess.check_output([CPYTHON3, 'feature_check/byteorder.py'])
179178
skip_endian = (upy_byteorder != cpy_byteorder)
180179

181180
# Some tests shouldn't be run under Travis CI

0 commit comments

Comments
 (0)