From 3bd20bde1e49ab664cc53262ec5ebb3e6323d3f6 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 21 Jul 2009 22:11:47 +0200 Subject: make tests separate reusable files + make the testing thing a bit better --- .../perform_test.sh | 26 +++++++++++++--------- .../automatic-lvm-dmcrypt-install-sda/profile | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'tests/runtime') diff --git a/tests/runtime/automatic-lvm-dmcrypt-install-sda/perform_test.sh b/tests/runtime/automatic-lvm-dmcrypt-install-sda/perform_test.sh index d0a20b0..390ee63 100644 --- a/tests/runtime/automatic-lvm-dmcrypt-install-sda/perform_test.sh +++ b/tests/runtime/automatic-lvm-dmcrypt-install-sda/perform_test.sh @@ -1,20 +1,24 @@ -#!/bin/sh +#!/bin/bash +source /usr/share/aif/tests/lib/framework-runtime -free -m | grep 'Swap:.*20.*' || echo 'SWAP CHECK FAILED' +aiftest swap 19 +aiftest lvm-lv cryptpool cryptroot '800.00 MB' +aiftest mount '/dev/mapper/cryptpool-cryptroot on / type xfs (rw)' +aiftest mount '/dev/mapper/cryptpool-crypthome on /home type xfs (rw)' +for i in /etc/ / /root/ /home/ /var/ +do + aiftest file "$i"/test_file +done +aiftest file /usr/bin/ssh +aiftest nofile /sbin/mkfs.reiserfs +aiftest nopackage sudo +aiftest ping 2 archlinux.org -lvdisplay | grep -A 5 'LV Name.*/dev/mapper/cryptpool-cryptroot' | grep available || echo 'LV ROOT CHECK FAILED' -lvdisplay | grep -A 7 'LV Name.*/dev/mapper/cryptpool-cryptroot' | grep 'LV Size.*800.00 MB' || echo 'LV ROOT CHECK FAILED' +aiftest-done -mount | grep '/dev/mapper/cryptpool-cryptroot on / type xfs (rw)' || echo 'ROOT FS CHECK FAILED' -mount | grep '/dev/mapper/cryptpool-crypthome on /home type xfs (rw)' || echo 'HOME FS CHECK FAILED' -for i in /etc/ / /root/ /home/ /var/ -do [ -f "$i/test_file" ] || echo "TEST FAILED. NO FILE $i/test_file" -done -[ -x /usr/bin/ssh ] || echo 'PACKAGE INSTALLATION CHECK SSH FAILED' -[ -f /sbin/mkfs.reiserfs ] && echo 'PACKAGE INSTALLATION CHECK REISERFS FAILED' ping -c 2 archlinux.org || echo 'PING CHECK FAILED' diff --git a/tests/runtime/automatic-lvm-dmcrypt-install-sda/profile b/tests/runtime/automatic-lvm-dmcrypt-install-sda/profile index 1494d3a..484de8e 100644 --- a/tests/runtime/automatic-lvm-dmcrypt-install-sda/profile +++ b/tests/runtime/automatic-lvm-dmcrypt-install-sda/profile @@ -11,7 +11,7 @@ RUNTIME_PACKAGES= # packages to install TARGET_GROUPS=base TARGET_PACKAGES_EXCLUDE='reiserfsprogs' -TARGET_PACKAGES=openssh +TARGET_PACKAGES='openssh aif' worker_configure_system () { sed -i 's/filesystems/usbinput keymap encrypt lvm2 filesystems/' $var_TARGET_DIR/etc/mkinitcpio.conf -- cgit v1.2.3-54-g00ecf