4 Commits

Author SHA1 Message Date
Damien George
8f8f853982 tests/run-tests.py: Consider tests ending in _async.py as async tests.
Some checks failed
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
The test `micropython/ringio_async.py` is a test that requires async
keyword support, and will fail with SyntaxError on targets that don't
support async/await.  Really it should be skipped on such targets, and this
commit makes sure that's the case.

Signed-off-by: Damien George <damien@micropython.org>
2025-07-12 23:48:17 +10:00
Damien George
125d19ce7b tests/micropython: Add missing SystemExit after printing SKIP.
The test runner expects `print("SKIP")` to be followed by
`raise SystemExit`.  Otherwise it waits for 10 seconds for the target to
do a soft reset before timing out and continuing.

Signed-off-by: Damien George <damien@micropython.org>
2025-07-12 23:32:28 +10:00
Damien George
908f938c44 tests/extmod/asyncio_iterator_event.py: Use format instead of f-string.
Some targets don't have f-strings enabled, so try not to use them in tests.
Rather, use `str.format`, which is more portable.

Signed-off-by: Damien George <damien@micropython.org>
2025-07-12 22:37:56 +10:00
Jeff Epler
499bedf7aa tools/ci.sh: Always call apt-get update before apt-get install.
There have been recent build failures in build_renesas_ra_board.  It
appears to be the case that a security update for this package was recently
issued by Ubuntu for CVE-2025-4565 and the buggy version is no longer on
package servers.  However, it is still referred to by the cached apt
metadata in the GitHub runners.

Add `apt-get update` to fix this, and audit for other sites in `ci.sh`
where it might also be necessary.

Signed-off-by: Jeff Epler <jepler@gmail.com>
2025-07-12 22:13:29 +10:00
6 changed files with 25 additions and 17 deletions

View File

@@ -50,7 +50,7 @@ def schedule_watchdog(end_ticks):
async def test(ai):
for x in range(3):
await asyncio.sleep(0.1)
ai.fetch_data(f"bar {x}")
ai.fetch_data("bar {}".format(x))
class AsyncIterable:

View File

@@ -5,8 +5,9 @@ import micropython
# these functions are not always available
if not hasattr(micropython, "mem_info"):
print("SKIP")
else:
micropython.mem_info()
micropython.mem_info(1)
micropython.qstr_info()
micropython.qstr_info(1)
raise SystemExit
micropython.mem_info()
micropython.mem_info(1)
micropython.qstr_info()
micropython.qstr_info(1)

View File

@@ -5,13 +5,14 @@ import micropython
# these functions are not always available
if not hasattr(micropython, "mem_total"):
print("SKIP")
else:
t = micropython.mem_total()
c = micropython.mem_current()
p = micropython.mem_peak()
raise SystemExit
l = list(range(10000))
t = micropython.mem_total()
c = micropython.mem_current()
p = micropython.mem_peak()
print(micropython.mem_total() > t)
print(micropython.mem_current() > c)
print(micropython.mem_peak() > p)
l = list(range(10000))
print(micropython.mem_total() > t)
print(micropython.mem_current() > c)
print(micropython.mem_peak() > p)

View File

@@ -3,5 +3,6 @@ import micropython
if not hasattr(micropython, "stack_use"):
print("SKIP")
else:
print(type(micropython.stack_use())) # output varies
raise SystemExit
print(type(micropython.stack_use())) # output varies

View File

@@ -886,7 +886,7 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
is_bytearray = test_name.startswith("bytearray") or test_name.endswith("_bytearray")
is_set_type = test_name.startswith(("set_", "frozenset")) or test_name.endswith("_set")
is_slice = test_name.find("slice") != -1 or test_name in misc_slice_tests
is_async = test_name.startswith(("async_", "asyncio_"))
is_async = test_name.startswith(("async_", "asyncio_")) or test_name.endswith("_async")
is_const = test_name.startswith("const")
is_io_module = test_name.startswith("io_")
is_fstring = test_name.startswith("string_fstring")

View File

@@ -13,11 +13,13 @@ ulimit -n 1024
# general helper functions
function ci_gcc_arm_setup {
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi
arm-none-eabi-gcc --version
}
function ci_gcc_riscv_setup {
sudo apt-get update
sudo apt-get install gcc-riscv64-unknown-elf picolibc-riscv64-unknown-elf
riscv64-unknown-elf-gcc --version
}
@@ -35,6 +37,7 @@ function ci_picotool_setup {
# c code formatting
function ci_c_code_formatting_setup {
sudo apt-get update
sudo apt-get install uncrustify
uncrustify --version
}
@@ -703,6 +706,7 @@ function ci_unix_float_run_tests {
}
function ci_unix_clang_setup {
sudo apt-get update
sudo apt-get install clang
clang --version
}
@@ -839,6 +843,7 @@ function ci_unix_qemu_riscv64_run_tests {
# ports/windows
function ci_windows_setup {
sudo apt-get update
sudo apt-get install gcc-mingw-w64
}