#!/bin/sh # # Script which does some basic tests to ensure we haven't regressed. # Probably a good idea to run this before doing any checkins. # In the future this can become more fancy, but it's OK for now. RUNDIR=`dirname $0` PATH=$PATH:$RUNDIR ERROR= [ "`mount | grep /mnt/lustre`" ] || echo | sh llmount.sh || exit 1 # let's start slowly here... touch /mnt/lustre || exit 2 cp /etc/hosts /mnt/lustre || exit 3 diff -u /etc/hosts /mnt/lustre/hosts || exit 4 # ok, that hopefully worked, so let's do a little more FILES=`find /etc -type f` echo "copying files from /etc to /mnt/lustre" tar cf - $FILES | tar xf - -C /mnt/lustre || exit 10 echo "comparing newly copied files" for f in $FILES; do diff -q $f /mnt/lustre/$f || ERROR=11 done [ "$ERROR" ] && exit $ERROR sh llmountcleanup.sh echo | sh llrmount.sh || exit 20 echo "comparing previously copied files" diff -u /etc/hosts /mnt/lustre/hosts || exit 21 for f in $FILES; do diff -q $f /mnt/lustre/$f || ERROR=22 done [ "$ERROR" ] && exit $ERROR rm /mnt/lustre/hosts || exit 23 rm -r /mnt/lustre/etc || exit 24 sh llmountcleanup.sh