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

Make XdpAppInfo more testable #1627

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

swick
Copy link
Contributor

@swick swick commented Feb 12, 2025

See commits

GeorgesStavracas and others added 10 commits February 12, 2025 19:00
* Add space before '('
* gchar → char
* Remove stray newline
Makes it slightly easier to read.
It takes care of figuring out which app info kind must be created.
This more robust than trying to keep track of all the things that are
not host and as a bonus also removes a bunch of code.
This makes it easier to see what's actually going on and we don't have
to keep track of so many arguments with "do not set" values.
This just creates a bit more order.
@swick swick mentioned this pull request Feb 12, 2025
@swick swick force-pushed the wip/app-info-refactor branch from 8a662e1 to 3c2fdf6 Compare February 12, 2025 18:17
The xdp_app_info_*_new functions take care of figuring out if the
testing harness is trying to create this XdpAppInfo type, and then
creates an instance, based on a bunch of subtype specific environment
variables.

The next commit will start making use of it.
Now that the subclasses handle testing requirements themselves, the
generic XdpAppInfo code can stop caring about it, and the XdpAppInfoTest
class can be dropped.

The testing harness is also adjusted to take advantage of this new
feature. In particular, for USB query support the flatpak kind needs to
be used.

This makes it possible to run test with specific or all XdpAppInfo types
that we have.
@swick swick force-pushed the wip/app-info-refactor branch from 7694452 to cc1cfa2 Compare February 12, 2025 18:18
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.

2 participants