Improves multiarch build by improving our mocking capabilities and test.
changes from v3:
* new file helpers for ovmf that get mocked
* changed some comment wording
* require '$arch' in 'get_cpu_models_by_arch'
changes from v2:
* split the first patch up in two
* use the get_host_arch helper everywhere in the package
* use a getter that auto-intiializes the global cpu model list
Dominik Csapak (4):
ovmf: introduce helpers that can be mocked for tests
tests: improve multiarch build support by introducing local
get_host_arch helper
tests: improve multiarch build support by allowing re-init of cpu
models
tests: cfg2cmd: add some architecture tests
src/PVE/API2/Qemu/Machine.pm | 3 +-
src/PVE/QemuServer.pm | 5 +-
src/PVE/QemuServer/CPUConfig.pm | 283 ++++++++++--------
src/PVE/QemuServer/Helpers.pm | 8 +-
src/PVE/QemuServer/OVMF.pm | 35 ++-
src/test/Makefile | 5 +-
src/test/cfg2cmd/aarch64/simple-arm-host.conf | 17 ++
.../cfg2cmd/aarch64/simple-arm-host.conf.cmd | 41 +++
src/test/cfg2cmd/aarch64/simple-arm.conf | 17 ++
src/test/cfg2cmd/aarch64/simple-arm.conf.cmd | 41 +++
src/test/run_config2command_tests.pl | 27 +-
11 files changed, 331 insertions(+), 151 deletions(-)
create mode 100644 src/test/cfg2cmd/aarch64/simple-arm-host.conf
create mode 100644 src/test/cfg2cmd/aarch64/simple-arm-host.conf.cmd
create mode 100644 src/test/cfg2cmd/aarch64/simple-arm.conf
create mode 100644 src/test/cfg2cmd/aarch64/simple-arm.conf.cmd
--
2.47.3