Whamcloud - gitweb
- name switch: "light" --> "lite"
[fs/lustre-release.git] / lustre / tests / runtests
1 #!/bin/sh
2 #
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.
6
7 RUNDIR=`dirname $0`
8
9 PATH=$PATH:$RUNDIR
10
11 ERROR=
12
13 llmount.sh || exit 1
14
15 # let's start slowly here...
16 touch /mnt/lustre || exit 2
17 cp /etc/hosts /mnt/lustre || exit 3
18 diff -u /etc/hosts /mnt/lustre/hosts || exit 4
19
20 # ok, that hopefully worked, so let's do a little more
21 FILES=`find /etc -type f`
22 echo "copying files from /etc to /mnt/lustre"
23 tar cf - $FILES | tar xf - -C /mnt/lustre || exit 10
24
25 echo "comparing newly copied files"
26 for f in $FILES; do
27         diff -q $f /mnt/lustre/$f || ERROR=11
28 done
29
30 [ "$ERROR" ] && exit $ERROR
31
32 llmountcleanup.sh
33
34 llrmount.sh || exit 20
35 echo "comparing previously copied files"
36 diff -u /etc/hosts /mnt/lustre/hosts || exit 21
37
38 for f in $FILES; do
39         diff -q $f /mnt/lustre/$f || ERROR=22
40 done
41
42 [ "$ERROR" ] && exit $ERROR
43
44 rm /mnt/lustre/hosts || exit 23
45
46 rm -r /mnt/lustre/etc || exit 24
47
48 llmountcleanup.sh