Repository navigation
Test tools force multimer's source with MULTIMER_SOURCE - #152
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #150.
pydevices 0.6 reads
MULTIMER_SOURCEand ignoresMULTIMER_BACKEND, andmultimer.autono 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-sourceandlv_timer_test_kit.py --sourcesetMULTIMER_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 tononewithout raising.example_test_kit.pyforwardsMULTIMER_SOURCEand refuses to run whenMULTIMER_BACKENDis set. The wrapper's no-thread quit schedule also importedmultimer.auto; it usesmultimernow.tools/timing_benchkeepsMULTIMER_BACKENDon purpose, as the issue says.What I ran, from a checkout at sibling depth so
--source-workspacefinds pydevices and lvgl-bindings:tests/test_multimer_source.py: 5 tests OK. The preload tests run it under CPython forpending,noneandwasm(unavailable, exit 3). On main they fail because the preload that forces a source doesn't exist.lv_timer_test_kit.py --source signal: micropythonsignal/bytecode, ok, cpython-venvsignal/bytecode, ok.--source pending: cpython-venvpending/bytecode, ok, micropythonunavailable.--source none: micropythonnone/idle, ok.MULTIMER_SOURCE=pending example_test_kit.py --only-example lv_test_timer --only-interpreter cpython-venv:SDLDisplay, ok. WithMULTIMER_BACKEND=sdl2it stops with "MULTIMER_BACKEND is retired; set MULTIMER_SOURCE ...".ruff check lib tests tools scriptspasses.Not run: the Windows
.exeinterpreters and CircuitPython.