# RACER tests
##############################################################################
-# scratch device to mount on /n/scratch
-#SCRATCH_DEV=/dev/hdd2
-SCRATCH_DEV=/dev/sdb
+# Scratch device to mount on /n/scratch.
+# Users can set $SCRATCH_DEV and export it, else we default to /dev/sdb
+test -z "$SCRATCH_DEV" && SCRATCH_DEV=/dev/sdb
function runcmd
{
tmpfs )
runcmd umount /n/scratch
runcmd swapoff $SCRATCH_DEV
- ;;
+v ;;
nfs )
runcmd umount /n/scratch
runcmd exportfs -u localhost:/n/lower
cleanup
fi
-# file system specific mkfs programs have a -q option for quiet but
-# it doesn't prevent asking for confirmation when a filesystem already
-# exists on the specified disk
-# so we must feed in a y to proceed through this prompt
-# I couldn't get yes(1) to play nicely with runcmd
-# mkfs.ext4 also has a -F force option but this didn't work for me
+# File system specific mkfs programs have a -q option for quiet but it
+# doesn't prevent asking for confirmation when a filesystem already exists
+# on the specified disk. So we must feed in a "y" to proceed through this
+# prompt. We couldn't get yes(1) to play nicely with runcmd. mkfs.ext4
+# also has a -F force option but this didn't seem to work.
case "$lowertype" in
ext2 | ext3 | ext4 | reiserfs )
runcmd mkfs -t $lowertype -q $SCRATCH_DEV <<< y