Closed smcv closed 3 years ago
@gasinvein reminded me that this was still marked as a draft. The Flatpak feature was finalized and merged, so this is now ready (other than needing #38 reviewed first).
I've also added a unit test, now that #47 has provided a framework for testing it. No changes in the actual implementation.
Based on the refactoring from #38.
38
flatpak-spawn: Add the ability to set a custom path for /app or /usr
This is a client-side for https://github.com/flatpak/flatpak/pull/4018.
Steam's pressure-vessel tool does the equivalent of this to launch a parallel container with /usr supplied by the Steam Runtime, and an empty /app, although currently it has to use code derived from flatpak-spawn rather than using the runtime's copy of flatpak-spawn.
test-spawn: Check contents of options dict more extensibly
Instead of asserting that there is a hard-coded number of items in the dict, count how many items we have checked and then assert that there are no extra items left over at the end. This will make it easier to test more options that add more items.
tests: Exercise flatpak-spawn --app-path and --usr-path