summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/feature_check/uio_module.py5
-rw-r--r--tests/feature_check/uio_module.py.exp0
-rwxr-xr-xtests/run-tests8
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/feature_check/uio_module.py b/tests/feature_check/uio_module.py
new file mode 100644
index 000000000..1031cba90
--- /dev/null
+++ b/tests/feature_check/uio_module.py
@@ -0,0 +1,5 @@
+try:
+ import uio
+ print("uio")
+except ImportError:
+ print("no")
diff --git a/tests/feature_check/uio_module.py.exp b/tests/feature_check/uio_module.py.exp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/feature_check/uio_module.py.exp
diff --git a/tests/run-tests b/tests/run-tests
index 5a2086c5a..77667c271 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -227,6 +227,7 @@ def run_tests(pyb, tests, args, base_path="."):
skip_async = False
skip_const = False
skip_revops = False
+ skip_io_module = False
skip_endian = False
has_complex = True
has_coverage = False
@@ -276,6 +277,11 @@ def run_tests(pyb, tests, args, base_path="."):
if output == b'TypeError\n':
skip_revops = True
+ # Check if uio module exists, and skip such tests if it doesn't
+ output = run_feature_check(pyb, args, base_path, 'uio_module.py')
+ if output != b'uio\n':
+ skip_io_module = True
+
# Check if emacs repl is supported, and skip such tests if it's not
t = run_feature_check(pyb, args, base_path, 'repl_emacs_check.py')
if not 'True' in str(t, 'ascii'):
@@ -430,6 +436,7 @@ def run_tests(pyb, tests, args, base_path="."):
is_slice = test_name.find("slice") != -1 or test_name in misc_slice_tests
is_async = test_name.startswith("async_")
is_const = test_name.startswith("const")
+ is_io_module = test_name.startswith("io_")
skip_it = test_file in skip_tests
skip_it |= skip_native and is_native
@@ -441,6 +448,7 @@ def run_tests(pyb, tests, args, base_path="."):
skip_it |= skip_async and is_async
skip_it |= skip_const and is_const
skip_it |= skip_revops and test_name.startswith("class_reverse_op")
+ skip_it |= skip_io_module and is_io_module
if args.list_tests:
if not skip_it: