3 # Script which does some basic tests to ensure we haven't regressed.
4 # Probably a good idea to run this before doing any checkins.
5 # In the future this can become more fancy, but it's OK for now.
9 export PATH=/sbin:/usr/sbin:$SRCDIR:$PATH
17 [ "`mount | grep $OSCMT`" ] || echo | sh llsetup.sh $@ || exit 1
19 # let's start slowly here...
20 echo "touching $OSCMT"
21 touch $OSCMT || fail "can't touch $OSCMT" 2
22 echo "copying /etc/hosts to $OSCMT/hosts"
23 cp /etc/hosts $OSCMT || fail "can't cp /etc/hosts to $OSCMT/hosts" 3
24 echo "comparing /etc/hosts and $OSCMT/hosts"
25 diff -u /etc/hosts $OSCMT/hosts || fail "$OSCMT/hosts different" 4
27 # ok, that hopefully worked, so let's do a little more
28 FILES=`find /etc -type f`
29 echo "copying files from /etc to $OSCMT/etc"
30 tar cf - $FILES | tar xvf - -C $OSCMT || fail "copying /etc" 10
32 echo "comparing newly copied files"
34 diff -q $f $OSCMT/$f || ERROR=11
37 [ "$ERROR" ] && fail "old and new files are different" 11
41 echo | sh llrsetup.sh $@ || exit 20
42 echo "comparing previously copied files"
43 diff -u /etc/hosts $OSCMT/hosts || fail "$OSCMT/hosts is now different" 21
46 diff -q $f $OSCMT/$f || ERROR=22
49 [ "$ERROR" ] && fail "old and new files are different on second diff" 23
52 echo | sh llrsetup.sh $@ || exit 24
54 echo "truncating $OSCMT/hosts"
55 > $OSCMT/hosts || fail "can't truncate $OSTMT/hosts" 25
56 echo "removing $OSCMT/hosts"
57 rm $OSCMT/hosts || fail "can't remove $OSCMT/hosts" 26
59 echo "removing $OSCMT/etc"
60 rm -r $OSCMT/etc || fail "can't remove $OSCMT/etc" 27