Skip to content
Snippets Groups Projects
Commit de82a412 authored by Simon McVittie's avatar Simon McVittie
Browse files

pv-wrap: Have test coverage for the single-architecture case


Until now, the case where only one architecture is supported has only
been tested if pressure-vessel was built for a non-x86 architecture
such as ARM, which is rarely (if ever) done.

We can get coverage for this case by making pv-wrap behave as if only
the first architecture was supported, as a runtime rather than
compile-time decision: this means that an ordinary x86_64 build can
exercise both the x86 and non-x86 code paths.

This is important because steamrt/tasks#595 will add new code that
differs according to whether there is only a single architecture,
or more than one.

In the test, this means we need to be able to mark which of the expected
paths are expected on i386 only, and which ones are expected in general.
Instead of the verbosity that would result from turning all of our
test data into structs, I've done this with an ad-hoc mini-language:
the ones that are only expected on i386 are prefixed with `i386:`.

We also might conceivably want to make use of something similar to
PV_APPEND_PRELOAD_FLAGS_ONE_ARCHITECTURE in production in future, if
we start providing legacy-free containers that only support running
x86_64 games.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent be7d6382
No related branches found
No related tags found
1 merge request!781Test coverage and refactoring in preparation for steamrt/tasks#595
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment