Improves multiarch build by improving our mocking capabilities and test.
changes from v4:
* move file helper to PVE::File (pve-common; new patch)
* rename 'get_file_size' to 'file_get_size' (same convention as
'file_get_contents')
* fix a comment that was not true anymore
* improve the 'file_get_size' mocked function (thanks @Fiona)
* add a reset for 'all_cpu_models' in the initialize function
- should not matter in practice, but could become a bug in the tests.
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
pve-common:
Dominik Csapak (1):
file: add exists and size helper
src/PVE/File.pm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
qemu-server:
Dominik Csapak (4):
ovmf: use 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 | 288 ++++++++++--------
src/PVE/QemuServer/Helpers.pm | 8 +-
src/PVE/QemuServer/OVMF.pm | 24 +-
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 | 31 +-
11 files changed, 328 insertions(+), 152 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
Summary over all repositories:
12 files changed, 342 insertions(+), 152 deletions(-)
--
Generated by git-murpp 0.8.1