diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-02 22:51:31 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-02 22:52:18 +0300 |
commit | b099aeb3ca5ff8bc6ab59f90f4e61a08e7d88e1e (patch) | |
tree | edba3ba2f52a3c26dd63455d92874af7a7abef9d /tests | |
parent | b9e9cfcfc1fd8e912f0e76cfe6a90c24b8f461ba (diff) | |
download | micropython-b099aeb3ca5ff8bc6ab59f90f4e61a08e7d88e1e.tar.gz micropython-b099aeb3ca5ff8bc6ab59f90f4e61a08e7d88e1e.zip |
run-tests: Add feature check for "const" keyword and skip related tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/feature_check/const.py | 1 | ||||
-rw-r--r-- | tests/feature_check/const.py.exp | 0 | ||||
-rwxr-xr-x | tests/run-tests | 8 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/feature_check/const.py b/tests/feature_check/const.py new file mode 100644 index 0000000000..db32e8c69b --- /dev/null +++ b/tests/feature_check/const.py @@ -0,0 +1 @@ +x = const(1) diff --git a/tests/feature_check/const.py.exp b/tests/feature_check/const.py.exp new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/feature_check/const.py.exp diff --git a/tests/run-tests b/tests/run-tests index 43db15097e..773f3dc396 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -201,6 +201,7 @@ def run_tests(pyb, tests, args): skip_int_big = False skip_set_type = False skip_async = False + skip_const = False # Check if micropython.native is supported, and skip such tests if it's not native = run_micropython(pyb, args, 'feature_check/native_check.py') @@ -222,6 +223,11 @@ def run_tests(pyb, tests, args): if native == b'CRASH': skip_async = True + # Check if const keyword (MicroPython extension) is supported, and skip such tests if it's not + native = run_micropython(pyb, args, 'feature_check/const.py') + if native == b'CRASH': + skip_const = True + # Check if emacs repl is supported, and skip such tests if it's not t = run_micropython(pyb, args, 'feature_check/repl_emacs_check.py') if not 'True' in str(t, 'ascii'): @@ -330,6 +336,7 @@ def run_tests(pyb, tests, args): is_int_big = test_name.startswith("int_big") or test_name.endswith("_intbig") is_set_type = test_name.startswith("set_") or test_name.startswith("frozenset") is_async = test_name.startswith("async_") + is_const = test_name.startswith("const") skip_it = test_file in skip_tests skip_it |= skip_native and is_native @@ -337,6 +344,7 @@ def run_tests(pyb, tests, args): skip_it |= skip_int_big and is_int_big skip_it |= skip_set_type and is_set_type skip_it |= skip_async and is_async + skip_it |= skip_const and is_const if skip_it: print("skip ", test_file) |