⚗️ automated testing
This commit is contained in:
parent
8c9db904df
commit
84dad2bcaa
2 changed files with 37 additions and 0 deletions
22
test/test.sh
Normal file
22
test/test.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
function test_config() {
|
||||
echo "Testing $1"
|
||||
|
||||
mkdir "${1%.*}"
|
||||
cd "${1%.*}"
|
||||
|
||||
echo "Creating ISO"
|
||||
doas navinstall create-iso --install "../$1"
|
||||
mv -v *.iso nav.iso
|
||||
|
||||
echo "Starting QEMU"
|
||||
qemu-img create -f qcow2 disk.qcow2 16G
|
||||
qemu-system-x86_64 -m 4G \
|
||||
-drive file=$(pwd)/disk.qcow2,if=virtio,format=qcow2 \
|
||||
-drive file=$(pwd)/nav.iso,media=cdrom,if=virtio,id=raw \
|
||||
-boot d -cpu host -enable-kvm -smp 4 -display sdl \
|
||||
-bios /usr/share/ovmf/x64/OVMF.4m.fd -machine q35,accel=kvm
|
||||
|
||||
cd ..
|
||||
echo "Cleaning up test env"
|
||||
doas rm -rv "${1%.*}"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue