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
19 [ "`mount | grep $OSCMT`" ] || echo | sh llsetup.sh $@ || exit 1
21 # let's start slowly here...
22 echo "touching $OSCMT"
23 touch $OSCMT || fail "can't touch $OSCMT" 2
24 echo "copying /etc/hosts to $OSCMT/hosts"
25 cp /etc/hosts $OSCMT || fail "can't cp /etc/hosts to $OSCMT/hosts" 3
26 echo "comparing /etc/hosts and $OSCMT/hosts"
27 diff -u /etc/hosts $OSCMT/hosts || fail "$OSCMT/hosts different" 4
29 # ok, that hopefully worked, so let's do a little more
30 FILES=`find $SRC -type f | head -$COUNT`
31 echo "copying files from $SRC to $OSCMT$SRC"
32 tar cf - $FILES | tar xvf - -C $OSCMT || fail "copying $SRC" 10
34 echo "comparing newly copied files"
36 diff -q $f $OSCMT/$f || ERROR=11
39 [ "$ERROR" ] && fail "old and new files are different" 11
43 echo | sh llrsetup.sh $@ || exit 20
44 echo "comparing previously copied files"
45 diff -u /etc/hosts $OSCMT/hosts || fail "$OSCMT/hosts is now different" 21
48 diff -q $f $OSCMT/$f || ERROR=22
51 [ "$ERROR" ] && fail "old and new files are different on second diff" 23
54 echo | sh llrsetup.sh $@ || exit 24
56 echo "truncating $OSCMT/hosts"
57 > $OSCMT/hosts || fail "can't truncate $OSTMT/hosts" 25
58 echo "removing $OSCMT/hosts"
59 rm $OSCMT/hosts || fail "can't remove $OSCMT/hosts" 26
61 echo "removing $OSCMT$SRC"
62 rm -r $OSCMT$SRC || fail "can't remove $OSCMT$SRC" 27