1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/lua.sh Fri Apr 23 19:14:17 2010 +0100
1.3 @@ -0,0 +1,28 @@
1.4 +#!/bin/sh
1.5 +check_filesystem()
1.6 +{
1.7 + if [ ! -e "$RAZOR_ROOT$1" ]; then
1.8 + echo $1: Not in filesystem >&2
1.9 + exit 1
1.10 + fi
1.11 +}
1.12 +check_file()
1.13 +{
1.14 + ../src/razor list-files | grep -x "$1" > /dev/null
1.15 + if [ $? -ne 0 ]; then
1.16 + echo $1: Not in database >&2
1.17 + exit 1
1.18 + fi
1.19 + check_filesystem "$1"
1.20 +}
1.21 +export RAZOR_ROOT=`mktemp -dt` || exit 1
1.22 +../src/razor init || exit 1
1.23 +export YUM_URL="file://localhost/`pwd`"
1.24 +../src/razor import-yum || exit 1
1.25 +../src/razor install filesystem || exit 1
1.26 +check_file /etc
1.27 +check_file /usr/bin
1.28 +check_file /usr/lib
1.29 +check_file /usr/include
1.30 +check_filesystem /media/cdrom
1.31 +rm -rf "$RAZOR_ROOT"