⚗️ automated testing
This commit is contained in:
parent
8c9db904df
commit
84dad2bcaa
2 changed files with 37 additions and 0 deletions
15
test/min.toml
Normal file
15
test/min.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[drive]
|
||||||
|
disk = "/dev/vda"
|
||||||
|
|
||||||
|
[general]
|
||||||
|
mode = "Base"
|
||||||
|
locale = "de_DE.UTF-8"
|
||||||
|
keyboard_layout = "de"
|
||||||
|
keyboard_variant = "mac"
|
||||||
|
timezone = "Europe/Berlin"
|
||||||
|
hostname = "navos_min"
|
||||||
|
root_password = "root"
|
||||||
|
firewall = false
|
||||||
|
|
||||||
|
[pkg]
|
||||||
|
pkg = []
|
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
Reference in a new issue