summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-08-30 00:28:59 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-08-30 00:37:53 +0300
commit0a8b5d160bf9297dcb39af5657f61141038a0855 (patch)
treedb4523b0d61764653a619f728db55097e5c40d74 /tests
parent18c22faf4d643098731fc2e448b212dfbd5ea612 (diff)
downloadmicropython-0a8b5d160bf9297dcb39af5657f61141038a0855.tar.gz
micropython-0a8b5d160bf9297dcb39af5657f61141038a0855.zip
run-tests: Allow to skip byteorder-dependent tests.
If byteorder of MicroPython under test and host CPython differ.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/run-tests b/tests/run-tests
index 28857249ee..490475202d 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -174,6 +174,10 @@ def run_tests(pyb, tests, args):
skip_tests.add('cmdline/repl_emacs_check.py')
skip_tests.add('cmdline/repl_emacs_keys.py')
+ upy_byteorder = run_micropython(pyb, args, 'byteorder.py')
+ cpy_byteorder = subprocess.check_output([CPYTHON3, 'byteorder.py'])
+ skip_endian = (upy_byteorder != cpy_byteorder)
+
# Some tests shouldn't be run under Travis CI
if os.getenv('TRAVIS') == 'true':
skip_tests.add('basics/memoryerror.py')
@@ -230,8 +234,9 @@ def run_tests(pyb, tests, args):
test_basename = os.path.basename(test_file)
test_name = os.path.splitext(test_basename)[0]
is_native = test_name.startswith("native_") or test_name.startswith("viper_")
+ is_endian = test_name.endswith("_endian")
- if test_file in skip_tests or (skip_native and is_native):
+ if test_file in skip_tests or (skip_native and is_native) or (skip_endian and is_endian):
print("skip ", test_file)
skipped_tests.append(test_name)
continue