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

build: Fix testprocess invocation during "as-installed" tests #10884

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Sep 17, 2024

During build-time testing, we can use $<TARGET_FILE:childprocess> to pass the just-built childprocess executable to it as an argument, but during "as-installed" testing we need to use the installed path of the childprocess executable instead.

@smcv
Copy link
Contributor Author

smcv commented Sep 17, 2024

I still need to test this in a .deb build, I'll undraft it when ready.

At the moment, the installed testprocess.test (which is a command to be run by gnome-desktop-testing-runner or something compatible) contains the literal string $<TARGET_FILE:childprocess> which is certainly not right:

$ cat /usr/share/installed-tests/SDL3/testprocess.test 
[Test]
Type=session
Exec=/usr/libexec/installed-tests/SDL3/testprocess $<TARGET_FILE:childprocess>

but even if it was replaced by the build-time path of the childprocess executable, that would also not be right for "as-installed" testing, because the build tree will not normally be available any more in that scenario. The only things that are guaranteed to be present for "as-installed" testing are the package containing the tests as installed into e.g. /usr (libsdl3-tests in Debian), and its dependencies.

During build-time testing, we can use `$<TARGET_FILE:childprocess>` to
pass the just-built childprocess executable to it as an argument, but
during "as-installed" testing we need to use the installed path of
the childprocess executable instead.

Signed-off-by: Simon McVittie <smcv@debian.org>
@smcv smcv marked this pull request as ready for review September 17, 2024 17:55
@smcv
Copy link
Contributor Author

smcv commented Sep 17, 2024

Build (All) / level2 / Windows (MSVC, clang-cl x86) (pull_request) Failing after 4m

Not sure what's going on with this; it still seems to be getting the right command-line argument during build-time testing. Is testprocess still flaky on Windows?

@smcv
Copy link
Contributor Author

smcv commented Sep 17, 2024

I still need to test this in a .deb build, I'll undraft it when ready

Seems to work well. It runs the just-built childprocess as a build-time test, or the installed childprocess as an installed-test.

@slouken
Copy link
Collaborator

slouken commented Sep 17, 2024

Build (All) / level2 / Windows (MSVC, clang-cl x86) (pull_request) Failing after 4m

Not sure what's going on with this; it still seems to be getting the right command-line argument during build-time testing. Is testprocess still flaky on Windows?

Yep. @madebr has a PR in progress with some fixes and better testing coverage.

@slouken slouken requested a review from madebr September 17, 2024 18:01
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