sysdeploy/tests/drive.sh

23 lines
380 B
Bash
Executable File

#!/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