pv-wrap: Store more state in the PvWrapContext
Further work towards steamrt/tasks#595. Based on !783 (merged), and I don't know would it will be possible to rebase it to be independent.
-
pv-wrap: Store the real or mock root directory in the PvWrapContext
This makes no practical difference yet, but we can use this for more consistent handling of a mock root directory for unit-testing in future.
-
pv-wrap: Make it more obvious that we're using the environment read-only
We're just looking at this, not altering it (not that we would be able to alter it with correct memory management under this calling convention, but that isn't necessarily immediately obvious to a reader).
-
tests: Store the mock environment in PvWrapContext instead of duplicating
This makes the tests a little bit closer to reality.
-
pv-wrap: Use the PvWrapContext to inspect the original environment
This keeps more of the things we have to mock for unit testing together, avoiding needing to thread a copy of the environment through the LD_PRELOAD setup code.
-
PvWrapContext: Store the PvRuntime in here
This lets us pass it to various functions as one parameter rather than two.
-
pv-wrap: Take "remove game overlay" option from PvWrapContext
It's slightly simpler without duplicating 1 bit of information like this.
-
pv-wrap: Store FlatpakExports in the PvWrapContext
This means we don't have to thread it through so much of wrap-setup as an explicit function parameter.
-
pv-wrap: Store the home directory in the PvWrapContext
This can be used to set a mock home directory for unit testing, which we now do in the wrap-setup test (although it isn't used for anything yet).