ubuntu noble (pre-24.04) experience #2528
Replies: 2 comments 2 replies
-
Thanks for writing this up @eichin! I've been looking at Ubuntu Noble as well. WebKit2 4.1
cairo
ast in pytest
actual toga failures
|
Beta Was this translation helpful? Give feedback.
-
Another vote of thanks for this writeup, @eichin. The one overarching caveat that I'll put here is that Linux is, by far, the hardest platform for us to test GUI behavior, because pretty much by definition, everything is up for interpretation by the desktop environment. We would definitely like the test suite to pass without issue on every Linux, on every desktop configuration... but that's just not possible. So - the only guarantee we really make at present is that the tests will pass on the configuration that is used in CI:
The "official" way to run the testbed on Linux is:
This - or at least a note that Linux testbed testing has some limitations - should probably be mentioned in the contribution guide, as it's definitely one of the more esoteric parts of the testing process. There are similar restrictions for other platforms - for example, iOS testing must be run on an iPhone SE 3rd Edition; Android must be on a phone with a Pixel 3a skin; but there are a lot more more moving parts on Linux. That said - we definitely aspire to the testbed suite passing everywhere, and we'd accept patches to make that the case.
Ideally, yes. However, there's at least 2 problems at present: The first is that pytest-asyncio can't be updated - there's a subtle change in how async fixtures are used that prevents us from upgrading. This is a straightforward "we need to fix it" problem - see #2382. The second is that upgrading any module with binary components (most notably, Pillow), requires that we also publish a binary wheel for iOS and Android. Since that's not happening automatically at present, it's a bit difficult to automate the upgrade. Fixing this one likely requires the cooperation of the rest of the ecosystem (or, at least Pillow). Getting the pieces in place for the ecosystem to be able to publish iOS/Android binary wheels is something Malcolm and I are working on for the rest of this year; Pillow will be an obvious candidate to target as a widely-used binary package to use as a "proof of concept" for this work. I'm planning to speak to Hugo about this at PyCon.
Based on the test report, most of those look like they're due to Xvfb or blackbox discrepancies (changing the size/position of windows, or windowing behavior). Patches welcome to modify any or all of these test conditions - even if it's in the form of test skips if the desktop environment doesn't match the expected values. |
Beta Was this translation helpful? Give feedback.
-
I've been working on a pre-24.04 system (2024-04-16 install about a week ago, but packages updated to this morning) and as part of looking at the visibility/display changes and getting oriented, I figured I'd walk through https://toga.readthedocs.io/en/stable/how-to/contribute-code.html#how-the-testbed-works on
main
and make sure that worked. (tl;dr: got down to12 failed, 389 passed
with some tweaking, but some of the problems aren't toga.)webkit
gir1.2-webkit2-4.0
isn't available anymore, instead installgir1.2-webkit2-4.1
and updategtk/src/toga_gtk/libs/gtk.py
to sayi.require_version("WebKit2", "4.1")
(otherwise you getRuntimeError: Unable to import WebKit2. Ensure that the system package providing Webkit2 and its GTK bindings have been installed.
from the webview and mapview tests.) Probably should be a fallback or fallforward.cairo
I don't have a test failure to match this one, but while I was stepping through
gtk.py
above, I caughtFixed this by installing the
python3-gi-cairo
package.pre-commit
The walkthrough talks about
pre-commit install
and then changing a file; you might want to encourage starting from an unchanged state first, which means runningpre-commit run --all-files
. (Got 11...Passed
out of that.)tox
Worked fine :-)
ast in pytest
briefcase dev --test
pops up the window and blows up immediately, treating deprecation warnings as errors, with 35 instances ofwith
To get past that, and the other DeprecationWarnings:
Not sure what to do with that from within toga (or briefcase) though.
actual toga failures
What's left is:
The
assert (1436, 2496) == (640, 480)
looks suspiciously like it's not handling my X environment: Xorg and i3-wm, tallscreen 1440x2560 (with a status-bar/tray so default windows areWidth: 1436
andHeight: 2496
.) Not sure that explains the others - are there perhaps font dependencies that aren't called out?Beta Was this translation helpful? Give feedback.
All reactions