Skip to content

Conversation

@swick
Copy link
Collaborator

@swick swick commented Nov 4, 2025

Every AppInfo kind multiplies the number of tests. Let's run the tests with the two which will give us the biggest coverage by default.

By setting XDP_TEST_RUN_LONG, all tests run with all AppInfo kinds.

In CI, we run the tests 3 times (test in the build dir, installed tests, dist). Let's run "main" tests with XDP_TEST_RUN_LONG=1 to get the full coverage while keeping the other tests short.

Every AppInfo kind multiplies the number of tests. Let's run the tests
with the two which will give us the biggest coverage by default.

By setting `XDP_TEST_RUN_LONG`, all tests run with all AppInfo kinds.

In CI, we run the tests 3 times (test in the build dir, installed tests,
dist). Let's run "main" tests with XDP_TEST_RUN_LONG=1 to get the full
coverage while keeping the other tests short.
@whot
Copy link
Collaborator

whot commented Nov 18, 2025

code LGTM but for the CI at least it might be worth figuring out a way to run jobs in parallel. The tests are already correctly named so you could pass the test name into meson and parallelize it via strategy:matrix:.

@swick
Copy link
Collaborator Author

swick commented Nov 18, 2025

Sorry, I'm not following.

@whot
Copy link
Collaborator

whot commented Nov 19, 2025

The CI currently runs a single1 invocation of meson test -C _build which currently takes too long. What you could do is to parallelize this into multiple jobs so you run each of the integration tests in a separate run, so e.g. meson test -C _build integration/account.

Push that into the CI's strategy:matrix and now you can run all tests in parallel, so something like (don't know the exact yaml syntax off hand):

  strategy:
    matrix:
      meson_testname:
        - "--no-suite=integration"   # runs the unit tests
        - "integration/account"
        - "integration/background"
        ...

   - name: Run xdg-desktop-portal tests
     run: timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson test -C _build ${{matrix.meson_test_name}}

And for safety an extra job that compares the output of meson test --list with a yq invocation on .github/workflows/build-and-test.yml to make sure all integration tests are listed in the CI, similiar to this one.

Footnotes

  1. well, once for gcc and once for clang

@swick
Copy link
Collaborator Author

swick commented Nov 19, 2025

Ah, I see what you mean now. The problem isn't really the time a single meson test run requires, but the fact that we run it 4 times: gcc, clang, dist, and installed. The tests are already heavily parallelized in meson (is_parallel) and in pytest (xdist -n 5). So more parallelization doesn't help much; for the runs to get faster we have to cut down the amount of tests.

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