Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "posix port" #9581

Draft
wants to merge 58 commits into
base: main
Choose a base branch
from
Draft

Add a "posix port" #9581

wants to merge 58 commits into from

Conversation

jepler
Copy link
Member

@jepler jepler commented Aug 30, 2024

The "posix port" aims to enable compile-time tests that we currently do with the "unix port", but with a build that uses as much of the CircuitPython shared-bindings & supervisor as possible. Once we have to stop maintaining changes within micropython's unix port, this removes one of the hassles of merging micropython changes into circuitpython. It may also enable testing new parts of the shared-modules libraries (for instance, gifio has become testable though this change)

Locally this test suite runs to completion, though it has more skips than the unix port did/does.

# ports/unix coverage
867 tests performed (53025 individual testcases)
867 tests passed
35 tests skipped

vs

# ports/posix
806 tests performed (51500 individual testcases)
806 tests passed
96 tests skipped

notably, the "vfs" tests are skipped.

This has been in the works for awhile and needs to be updated against the current main branch. Additionally at least some of the skipped tests would be good to cover (testing FAT filesystem on the host would be nice)

later, posix will hook into here somehow
the tests fail due to printing numbers differently
the bitmap* tests now pass
this fixes some test failures that rely on exact python float values
this is defined by python (returns 0) and tested in a test
.. will need to do the same in other asyncio tests
now you can use the same name shown in a list of failures/skips,
e.g., `make test-random_basic || make print-failures`
jepler added 28 commits April 6, 2024 11:17
later I'll want to switch it to float & endorse the new results but
for now just do this.
This change allows the unix/time_mktime_localtime.py test to work
in the POSIX build
.. shouldn't it say CircuitPython though?
we don't use this capability in CircuitPython but it was not hard
to make it work. Removing the "extensible module" related code altogether
might save some space though.
this doesn't run in host python because python is invoked with the -S
flag, disabling site packages (msgpack is not part of base python,
it's installed via pip if it's available)

I verified the message decodes in standard python with msgpack.
.. it now fails on unix coverage port but that's fine
this fixes some synthio tests that differed in output, because
dynamic range compression depends on the channel count.
qrio has an existing test, gifio does not
@jepler jepler marked this pull request as draft August 30, 2024 15:38
@jepler
Copy link
Member Author

jepler commented Aug 30, 2024

I reached a milestone of 0 failed tests so I felt it would be worth PR'ing. The list of conflicts is pretty extensive so I'll probably need to rebase this. This work is not an Adafruit priority so I'll also reserve the possibility of just closing this up so it doesn't linger in draft status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant