diff --git a/build/config/tests/bhyve.pyd b/build/config/tests/bhyve.pyd index 6d3db4c..2a9defb 100644 --- a/build/config/tests/bhyve.pyd +++ b/build/config/tests/bhyve.pyd @@ -30,6 +30,7 @@ NETMASK = "255.255.255.0" TELNET_PORT = "54321" RAM_SIZE = "2048" IMAGE_SIZE = "8g" +SWAP_SIZE = "2g" CONSOLE_MASTER = "/dev/nmdm0A" CONSOLE_SLAVE = "/dev/nmdm0B" KERNCONF = "MACHTEST" diff --git a/build/tools/run-trueos-tests.py b/build/tools/run-trueos-tests.py index ae45209..6d5ba63 100755 --- a/build/tools/run-trueos-tests.py +++ b/build/tools/run-trueos-tests.py @@ -77,6 +77,10 @@ def setup_rootfs(): sh('makefs -M ${IMAGE_SIZE} ${OBJDIR}/test-root.ufs ${OBJDIR}/test-root') +def setup_swap(): + sh('truncate -s ${SWAP_SIZE} ${OBJDIR}/test-swap.bin') + + def install_python_packages(): sh('cd ${SRC_ROOT}/py-launch; python setup.py install ') @@ -90,6 +94,7 @@ def setup_vm(): '-s 0:0,hostbridge', '-s 1:0,virtio-net,${tapdev}', '-s 2:0,ahci-hd,${OBJDIR}/test-root.ufs', + '-s 3:0,ahci-hd,${OBJDIR}/test-swap.bin', '-s 31,lpc -l com1,${CONSOLE_MASTER}', '${VM_NAME}' ) @@ -193,6 +198,7 @@ if __name__ == '__main__': sh('telnet 0 ${TELNET_PORT}') else: setup_rootfs() + setup_swap() setup_network() setup_vm() wait_vm() diff --git a/tests/trueos/overlay/etc/fstab b/tests/trueos/overlay/etc/fstab index fbd3ae8..5b47419 100644 --- a/tests/trueos/overlay/etc/fstab +++ b/tests/trueos/overlay/etc/fstab @@ -1 +1,2 @@ /dev/ada0 / ufs rw 0 0 +/dev/ada1 none swap sw 0 0 \ No newline at end of file