-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
tests: several failures when running in gnome from non gnome terminal #1278
Labels
Comments
Confirmed, I get the same in kitty and thus run the test-suite in gnome-terminal or gnome-console. I haven't figured out yet how to guess whether appid is set from the tests yet, the easiest would be to just remove that particular set of asserts though. |
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 28, 2024
Because programs running in a non gnome-terminal belong to a .scope unit starting with app, xdg-desktop-portal assings a non empty appid to them. On the other hand, for setting permissions into the permission store, tests assume that appid is the empty string. To fix this, retrieve the appid during global setup a,d store it in a global variable. It is then available to tests, and can be passed when setting permissions. Fix 3 test failures out of 5 reported in #1278 The other failures are in python tests. Signed-off-by: Pierre Labastie <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 28, 2024
Python tests assume that the appid is an empty string, which may be false when running tests on GNOME in a non gnome-terminal. Therefore, asserting that the appid is empty leads to an error. To fix this, just remove the asserts. They don't test anything since there is no independant way to retrieve the appid. Fix the remaining failures reported in #1278 Signed-off-by: Pierre Labastie <[email protected]>
jsparber
pushed a commit
to jsparber/xdg-desktop-portal
that referenced
this issue
Apr 4, 2024
Because programs running in a non gnome-terminal belong to a .scope unit starting with app, xdg-desktop-portal assings a non empty appid to them. On the other hand, for setting permissions into the permission store, tests assume that appid is the empty string. To fix this, retrieve the appid during global setup a,d store it in a global variable. It is then available to tests, and can be passed when setting permissions. Fix 3 test failures out of 5 reported in flatpak#1278 The other failures are in python tests. Signed-off-by: Pierre Labastie <[email protected]>
jsparber
pushed a commit
to jsparber/xdg-desktop-portal
that referenced
this issue
Apr 4, 2024
Python tests assume that the appid is an empty string, which may be false when running tests on GNOME in a non gnome-terminal. Therefore, asserting that the appid is empty leads to an error. To fix this, just remove the asserts. They don't test anything since there is no independant way to retrieve the appid. Fix the remaining failures reported in flatpak#1278 Signed-off-by: Pierre Labastie <[email protected]>
jsparber
pushed a commit
to jsparber/xdg-desktop-portal
that referenced
this issue
Apr 4, 2024
Because programs running in a non gnome-terminal belong to a .scope unit starting with app, xdg-desktop-portal assings a non empty appid to them. On the other hand, for setting permissions into the permission store, tests assume that appid is the empty string. To fix this, retrieve the appid during global setup a,d store it in a global variable. It is then available to tests, and can be passed when setting permissions. Fix 3 test failures out of 5 reported in flatpak#1278 The other failures are in python tests. Signed-off-by: Pierre Labastie <[email protected]>
jsparber
pushed a commit
to jsparber/xdg-desktop-portal
that referenced
this issue
Apr 4, 2024
Python tests assume that the appid is an empty string, which may be false when running tests on GNOME in a non gnome-terminal. Therefore, asserting that the appid is empty leads to an error. To fix this, just remove the asserts. They don't test anything since there is no independant way to retrieve the appid. Fix the remaining failures reported in flatpak#1278 Signed-off-by: Pierre Labastie <[email protected]>
Fixed by #1279 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating System
Ubuntu 23.10, linux from scratch development
XDG Desktop Portal version
1.18
XDG Desktop Portal version (Other)
1.18.2
Desktop Environment
GNOME
Desktop Environment (Other)
No response
Expected Behavior
All tests pass
Current Behavior
Five tests fail:
Steps to Reproduce
mkdir build && cd build && meson setup && ninja
ninja test
...
Anything else we should know?
Same issue also with the konsole terminal. Note that the unit associated to uxterm is of the form
app-gnome-uxterm-xxxx.scope
(orapp-gnome-debian\x2duxterm-xxxx.scope
on ubuntu), so that the app_id is non empty, and I guess all the failures come from that, because the app_id is supposed to be empty by all tests accessing the permission store.I have a working patch for the C tests, but I don't know how to access the app_id in python. On the other hand, I am not sure what your policy is for tests: I think there is no problem when running them in the CI set up.
Note also that the scope unit for gnome-terminal starts with
vte-spawn
, hence it generates an empty app_id, and the tests pass in that terminal...The text was updated successfully, but these errors were encountered: