Design for test: Add a way to redirect the helpers path
We can use this to connect up a mock implementation if necessary.
Intended for use by @jpwhiting in !24 (merged), which has mock wflinfo executables that will need to be found with logic like
if (helpers_path != NULL)
helper = g_strdup_printf ("%s/%s-wflinfo", helpers_path, multiarch_tuple);
else /* look in PATH */
helper = g_strdup_printf ("%s-wflinfo", multiarch_tuple);
if we build them in tests/
and install them in /usr/libexec/installed-tests/steam-runtime-tools-0
as we probably should.
Sorry @denittis, this is going to cause some (hopefully minor) rebase conflicts for you.
Merge request reports
Activity
721 * srt_system_info_set_helpers_path: 722 * @self: The #SrtSystemInfo 723 * @path: (nullable) (type filename) (transfer none): An absolute path 724 * 725 * Look for helper executables used to inspect the system state in @path, 726 * instead of the normal installed location. 727 * 728 * If @path is %NULL, go back to using the installed location. 729 */ 730 void 731 srt_system_info_set_helpers_path (SrtSystemInfo *self, 732 const gchar *path) 733 { 734 g_return_if_fail (SRT_IS_SYSTEM_INFO (self)); 735 736 forget_libraries (self); If !24 (merged) is rebased on this, @jpwhiting will have to expand on this to forget everything we think we know about the graphics drivers.
On !30 (merged), we should not need to forget what we think we know about the Steam installation and Steam Runtime, because they don't use helper subprocesses anyway.
added 1 commit
- 04bde362 - Design for test: Add a way to redirect the helpers path
mentioned in merge request !30 (merged)
mentioned in merge request !24 (merged)
- Resolved by Simon McVittie
Looks good to me, but probably want to hold off until @denittis has needed changes on his branch.
I've just merged @denittis' branch. I don't think anything will need to be changed in that branch, because it doesn't actually use helper subprocesses - I just need to fix the merge conflicts.
added 4 commits
-
04bde362...58a56a85 - 3 commits from branch
master
- 3ae9fc07 - Design for test: Add a way to redirect the helpers path
-
04bde362...58a56a85 - 3 commits from branch
@jpwhiting: if you are happy with this, please merge it and rebase your GL branch onto it.
mentioned in commit 7bda7568