Skip to content

Test tools force multimer's source with MULTIMER_SOURCE - #152

Merged
bdbarnett merged 1 commit into
mainfrom
fix/150-multimer-source
Sep 26, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/150-multimer-source

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

Fixes #150.

pydevices 0.6 reads MULTIMER_SOURCE and ignores MULTIMER_BACKEND, and multimer.auto no longer exists, so a forced-backend run either skipped as "unavailable" or tested the default source.

Now the preload (renamed tools/multimer_source_preload.py), the wrapper's --multimer-source and lv_timer_test_kit.py --source set MULTIMER_SOURCE, make multimer pick its source before the script runs, and check that the source in use is the one asked for. That check matters because a forced source that can't start falls back to none without raising. example_test_kit.py forwards MULTIMER_SOURCE and refuses to run when MULTIMER_BACKEND is set. The wrapper's no-thread quit schedule also imported multimer.auto; it uses multimer now. tools/timing_bench keeps MULTIMER_BACKEND on purpose, as the issue says.

What I ran, from a checkout at sibling depth so --source-workspace finds pydevices and lvgl-bindings:

  • tests/test_multimer_source.py: 5 tests OK. The preload tests run it under CPython for pending, none and wasm (unavailable, exit 3). On main they fail because the preload that forces a source doesn't exist.
  • lv_timer_test_kit.py --source signal: micropython signal/bytecode, ok, cpython-venv signal/bytecode, ok. --source pending: cpython-venv pending/bytecode, ok, micropython unavailable. --source none: micropython none/idle, ok.
  • MULTIMER_SOURCE=pending example_test_kit.py --only-example lv_test_timer --only-interpreter cpython-venv: SDLDisplay, ok. With MULTIMER_BACKEND=sdl2 it stops with "MULTIMER_BACKEND is retired; set MULTIMER_SOURCE ...".
  • ruff check lib tests tools scripts passes.

Not run: the Windows .exe interpreters and CircuitPython.

pydevices 0.6 reads MULTIMER_SOURCE and ignores MULTIMER_BACKEND, and
multimer.auto is gone, so every forced-backend run was skipped or ran the
default source. The preload (renamed multimer_source_preload.py), the
wrapper's --multimer-source and lv_timer_test_kit's --source now set
MULTIMER_SOURCE, make multimer choose its source at once, and check the
source in use is the one asked for (a forced source that cannot start falls
back to none silently). example_test_kit forwards MULTIMER_SOURCE and refuses
to run with MULTIMER_BACKEND set. The wrapper's no-thread quit schedule
imported multimer.auto too; it uses multimer now.

timing_bench keeps MULTIMER_BACKEND on purpose.

Fixes #150
@bdbarnett
bdbarnett merged commit 49bf653 into main Sep 26, 2026
4 checks passed
@bdbarnett
bdbarnett deleted the fix/150-multimer-source branch September 26, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Test tools still force multimer providers with MULTIMER_BACKEND

1 participant