summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-06-04 21:16:43 +0200
committerDamien George <damien@micropython.org>2025-06-10 11:29:02 +1000
commitc1c73d966ea2d3ee20dbde8c5cd6ea5bd99bc94f (patch)
treea004dfd1342169ddf0171eef0005ba4eef2ee0b1
parent5b90d6d4183d0455ba5077cfa8601bfacaa0bf15 (diff)
downloadmicropython-c1c73d966ea2d3ee20dbde8c5cd6ea5bd99bc94f.tar.gz
micropython-c1c73d966ea2d3ee20dbde8c5cd6ea5bd99bc94f.zip
tests/run-tests.py: Unconditionally enable native tests if asked.
This commit lets the test runner enumerate and run native tests if the feature check fails but native tests were explicitly requested from the command line. The old behaviour would disable native tests anyway if the feature check failed, however this hid a bug in the x86 native emitter that would be triggered even during the feature check. That meant the test suite would pass on x86 even with a broken emitter, as those tests would have been skipped anyway. Now, if the user asks for native code it will get native code out of the runner no matter what. Co-authored-by: Damien George <damien@micropython.org> Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rwxr-xr-xtests/run-tests.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/run-tests.py b/tests/run-tests.py
index cb7a8b7705..da05e18e4f 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -875,11 +875,7 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
test_basename = test_file.replace("..", "_").replace("./", "").replace("/", "_")
test_name = os.path.splitext(os.path.basename(test_file))[0]
- is_native = (
- test_name.startswith("native_")
- or test_name.startswith("viper_")
- or args.emit == "native"
- )
+ is_native = test_name.startswith("native_") or test_name.startswith("viper_")
is_endian = test_name.endswith("_endian")
is_int_big = test_name.startswith("int_big") or test_name.endswith("_intbig")
is_bytearray = test_name.startswith("bytearray") or test_name.endswith("_bytearray")