sysdeploy/tests/drive.sh

23 lines
380 B
Bash
Raw Normal View History

2021-02-26 22:19:36 +01:00
#!/bin/bash
function test_partitioning()
{
local img
img=$(mktemp -u)
qemu-img create -f qcow2 "$img" 16G
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 "$img"
sudo setup_drive /dev/nbd0
sudo parted -ms /deb/nbd0 -- print
sudo qemu-nbd -d /dev/nbd0
rm -f "$img"
}
function oneTimeSetUp()
{
. drive.inc
}
# Load shUnit2.
. /usr/bin/shunit2