Browse Source
This commit adds all necessary bits to be able to execute runtime tests for mender-convert'ed QEMU x86_64 image. Namely: * Install SSH key as an authorized one on the device using an overlay, and pass the private one to be use by the test framework. * Create a QEMU launcher wrapper, similar to the one in meta-mender, for the test framework to use in order to start/stop the virtual device. * Exclude the test_update tests for all configurations but Ubuntu QEMU one using a pytest filter 'not test_upate'. * Copy from meta-mender the keys required for test_signed_updates. * Install mender-artifact in CI to be used in tests. Changelog: None Signed-off-by: Lluis Campos <lluis.campos@northern.tech>2.3.x
Lluis Campos
4 years ago
6 changed files with 140 additions and 7 deletions
@ -0,0 +1,35 @@ |
|||
#!/bin/sh |
|||
|
|||
set -e |
|||
|
|||
if [ -z "$DISK_IMG" ]; then |
|||
echo "ERROR: DISK_IMG is not set" |
|||
exit 1 |
|||
fi |
|||
|
|||
# Look for OVMF_CODE.fd in /usr/share |
|||
ovmf_file=$(find /usr/share -type f -and -name OVMF_CODE.fd 2>/dev/null | head -1) |
|||
if [ -z "${ovmf_file}" ]; then |
|||
echo "ERROR: could not find OVMF file" |
|||
exit 1 |
|||
fi |
|||
|
|||
qemu-system-x86_64 \ |
|||
-enable-kvm \ |
|||
-nographic \ |
|||
-m 256 \ |
|||
-net user,hostfwd=tcp::8822-:22 \ |
|||
-net nic,macaddr=52:54:00$(od -txC -An -N3 /dev/urandom|tr \ :) \ |
|||
-bios ${ovmf_file} \ |
|||
-drive format=raw,file=${DISK_IMG} & |
|||
|
|||
qemu_pid=$! |
|||
|
|||
trap qemu_cleanup HUP KILL TERM |
|||
|
|||
qemu_cleanup() { |
|||
kill -s TERM $qemu_pid |
|||
} |
|||
|
|||
echo "QEMU started with PID $qemu_pid" |
|||
wait $qemu_pid |
@ -0,0 +1,51 @@ |
|||
-----BEGIN RSA PRIVATE KEY----- |
|||
MIIJKgIBAAKCAgEAybC1sV0O9Hp7kXcZvcGUhcQz/Mqgir7JT6K6w1k6WG1ov1y1 |
|||
lMGQY8WVVaXss6UDCpsrwq4JVQFnGdhc1IZy1w0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